#ABC305B. [ABC305B] ABCDEFG

[ABC305B] ABCDEFG

提示:该题测试数据补录中,暂不支持评测提交。

No testdata at current.

No submission language available for this problem.

Score : 200200 points

Problem Statement

There are 77 points AA, BB, CC, DD, EE, FF, and GG on a straight line, in this order. (See also the figure below.) The distances between adjacent points are as follows.

  • Between AA and BB: 33
  • Between BB and CC: 11
  • Between CC and DD: 44
  • Between DD and EE: 11
  • Between EE and FF: 55
  • Between FF and GG: 99

image

You are given two uppercase English letters pp and qq. Each of pp and qq is A, B, C, D, E, F, or G, and it holds that p≠qp \neq q. Find the distance between the points pp and qq.

Constraints

  • Each of pp and qq is A,B,C,D,E,F, or G.
  • p≠qp \neq q

Input

The input is given from Standard Input in the following format:

pp qq

Output

Print the distance between the points pp and qq.

A C
4

The distance between the points AA and CC is 3+1=43 + 1 = 4.

G B
20

The distance between the points GG and BB is 9+5+1+4+1=209 + 5 + 1 + 4 + 1 = 20.

C F
10