#STSTRING. Strings

Strings

Given two strings A and B, we define the operator ĉ on {A,B} for string C as C ĉ {A,B}.

if length(A) < length(C) < length(B), then C satisfies the above operator.
else
      if length(A)=length(C), then C must be lexicographically greater than A.
      if length(B)=length(C), then C must be lexicographically smaller than B.

Input

Given two strings A,B with length(A) < = length(B) <= 6. A,B can contain any characters between A and J (capital letters).

Output

Print the number of strings satisfying the above criteria. C must also satisfy criteria of A and B. Any two adjacent characters in string C may neither be the same nor consecutve (i.e. the absoulte difference between the ASCII values of adjacent characters is greater than 1).

Example

Input:
A J
AA BCD
ABC DEFG

Output:
8
129
1770