<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 main() {
  string s;
  getline(cin, s);
  int len = s.length();
  int sum = 0;
  for (int i = 0; i < len; i++) {
    bool b;
    if (s[i] >= 'A' && s[i] <= 'Z') {
      b = true;
    } else {
      b = false;
    }
    int sum1 = b * (s[i] - 'A' + 1);
    bool bb;
    if (s[i] >= 'a' && s[i] <= 'z') {
      bb = true;
    } else {
      bb = false;
    }
    int sum2 = bb * (s[i] - 'a' + 1);
    sum += sum1 - sum2;
  }
  cout << sum << endl;
  return 0;
}
