<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;
void solution() {
  string s;
  cin >> s;
  int res = 0;
  while (s.size()) {
    char t = *s.begin();
    s.erase(0, 1);
    bool T1 = '@' < t;
    bool T2 = '[' > t;
    bool T3 = '`' < t;
    bool T4 = '{' > t;
    int x1 = 0, x2 = 0;
    if (T1 && T2) x1++;
    if (T3 && T4) x2++;
    if (t <= 'Z' && t >= 'A')
      t -= 'A' - 1;
    else if (t <= 'z' && t >= 'a')
      t -= 'a' - 1;
    else if (t <= '9' && t >= '0')
      t -= 47;
    else
      t = 1;
    x1 *= t;
    x2 *= t;
    x1 -= x2;
    res += x1;
  }
  cout << res << '\n';
}
int main() { solution(); }
