4.1 Two Lands

Score: 30pts

Time Limit: 1.00 sec

There are two lands UPPER and lower.

UPPER land speaks in UPPER case.

lower land speaks in lower case.

You as an intermediary have to help these two lands communicate.

So you hire a translator which translates from UPPER case to lower case.

The translation happens as follows for UPPER to lower

\(A -> z, B -> y, C -> x, ..., Z -> a.\)

The translation happens as follows for lower to UPPER

\(a -> Z, b -> Y, c -> X, ..., z -> A.\)

The translator charges you money for each letter translated.

The cost for each letter is calculated as the xor of ascii value of both letters.

Ex ascii(A) xor ascii(z) will be the cost of translating from A -> z.

You are given 2 strings, the first is from UPPER land, the second is from LOWER land.

Help them by translating both and find the total cost.

UPPER land speaks in UPPER case.

lower land speaks in lower case.

You as an intermediary have to help these two lands communicate.

So you hire a translator which translates from UPPER case to lower case.

The translation happens as follows for UPPER to lower

\(A -> z, B -> y, C -> x, ..., Z -> a.\)

The translation happens as follows for lower to UPPER

\(a -> Z, b -> Y, c -> X, ..., z -> A.\)

The translator charges you money for each letter translated.

The cost for each letter is calculated as the xor of ascii value of both letters.

Ex ascii(A) xor ascii(z) will be the cost of translating from A -> z.

You are given 2 strings, the first is from UPPER land, the second is from LOWER land.

Help them by translating both and find the total cost.

Constraints

\(1 \leq\) length of string x and y \(\leq 8000\)

Input Format

The first line contains the first string from UPPER land \(x\)

The second line contains the second string from LOWER land \(y\).

The second line contains the second string from LOWER land \(y\).

Output Format

Print the total cost of converting the string

Example 1

Input:

ABC

abc

Output:

354

Explanation:

A is converted to z and cost of it is 65 xor 122 = 59

B is converted to y and cost of it is 66 xor 121 = 59

C is converted to x and cost of it is 67 xor 120 = 59

Total cost for this operation is 59 + 59 + 59 = 177

a is converted to Z and cost of it is 97 xor 90 = 59

b is converted to Y and cost of it is 98 xor 89 = 59

c is converted to X and cost of it is 99 xor 88 = 59

Total cost for this operation is 59 + 59 + 59 = 177

Therefore the total cost is 177 + 177 = 354

ABC

abc

Output:

354

Explanation:

A is converted to z and cost of it is 65 xor 122 = 59

B is converted to y and cost of it is 66 xor 121 = 59

C is converted to x and cost of it is 67 xor 120 = 59

Total cost for this operation is 59 + 59 + 59 = 177

a is converted to Z and cost of it is 97 xor 90 = 59

b is converted to Y and cost of it is 98 xor 89 = 59

c is converted to X and cost of it is 99 xor 88 = 59

Total cost for this operation is 59 + 59 + 59 = 177

Therefore the total cost is 177 + 177 = 354