<image>

You can preview the image in better quality by the link: [http://assets.codeforces.com/files/656/without-text.png](//assets.codeforces.com/files/656/without-text.png)

Input

The only line of the input is a string (between 1 and 50 characters long, inclusive). Each character will be an alphanumeric character or a full stop ".".

Output

Output the required answer.

Examples

Input

Codeforces


Output

-87


Input

APRIL.1st


Output

17
def f(c):
    v1 = c > '@'
    v2 = c < '['
    v3 = c > '`'
    v4 = c < '{'
    v5 = int(v1 and v2)
    v6 = int(v3 and v4)
    if c in '.0123456789':
        v7 = -1
    else:
        v7 = 'abcdefghijklmnopqrstuvwxyz'.index(c.lower()) + 1
    v8 = v5 * v7
    v9 = v6 * v7
    return v8 - v9

line = input()
res = 0
for c in line:
    res += f(c)
print(res)
