<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 getIndex(char ch) {
  if (ch - 'A' < 26 && ch >= 'A')
    return ch - 'A' + 1;
  else if (ch - 'a' < 26 && ch >= 'a')
    return ch - 'a' + 1;
  else
    return 0;
}
int main() {
  string inp;
  cin >> inp;
  int i;
  char curr;
  int prev_res = 0;
  for (i = 0; i < (int)inp.length(); i++) {
    curr = inp[i];
    int b1 = '@' < curr ? 1 : 0;
    int b2 = '[' > curr ? 1 : 0;
    int b3 = '`' < curr ? 1 : 0;
    int b4 = '{' > curr ? 1 : 0;
    b1 = b1 && b2;
    b2 = b3 && b4;
    int ind = getIndex(curr);
    b1 *= ind;
    b2 *= ind;
    b1 = b1 - b2;
    b1 = b1 + prev_res;
    prev_res = b1;
  }
  cout << prev_res << endl;
  return 0;
}
