<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
#include <bits/stdc++.h>
using namespace std;
char str[105];
int main() {
  scanf("%s", str);
  int ans = 0;
  for (int i = 0; i < strlen(str); i++) {
    int i1 = 0, i2 = 0, i3 = 0;
    int a1 = '@', a2 = str[i], a3 = '[', a4 = '`', a5 = '{';
    if ((a1 < a2) && (a3 > a2)) i1 = 1;
    if ((a4 < a2) && (a5 > a2)) i2 = 1;
    i3 = tolower(a2) - 'a' + 1;
    ans = ans + i1 * i3 - i2 * i3;
  }
  printf("%d\n", ans);
  return 0;
}
