<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;
int const MAX_N = 128 * 2;
long long const LL_INF = 1000000000000000009LL;
long long const MOD = 1000000007LL;
int main() {
  string st;
  cin >> st;
  long long ans = 0;
  for (int mid = 0; mid < ((int)st.length()); mid++) {
    string a = "";
    a += (char)st[mid];
    int a_1 = 0;
    int a_1_arg_1 = ('@') < a[0];
    int a_1_arg_2 = ('[') > a[0];
    a_1 = a_1_arg_1 && a_1_arg_2;
    int a_2 = 0;
    int a_2_arg_1 = ('`') < a[0];
    int a_2_arg_2 = ('{') > a[0];
    a_2 = a_2_arg_1 && a_2_arg_2;
    int index = 0;
    if ((st[mid] >= 'a' && st[mid] <= 'z') ||
        (st[mid] >= 'A' && st[mid] <= 'Z'))
      index = tolower(st[mid]) - 'a' + 1;
    long long gg_1 = a_1 * index;
    long long gg_2 = a_2 * index;
    long long gg = gg_1 - gg_2;
    ans += gg;
  }
  cout << ans;
  return 0;
}
