<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;
using pii = pair<int, int>;
using ll = long long;
const int INF = (int)1e9 + 7, mod = (int)1e9 + 9, pw = 31, N = (int)1e5 + 123,
          M = (int)1e6 + 123;
const double eps = 1e-11;
const long long inf = 1e18;
string second;
int id(char a) {
  if (a <= 'z' && a >= 'a') return a - 'a' + 1;
  return a - 'A' + 1;
}
ll res = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> second;
  for (int i = 0; i < second.size(); i++) {
    if (second[i] >= 'a' && second[i] <= 'z') res -= id(second[i]);
    if (second[i] >= 'A' && second[i] <= 'Z') res += id(second[i]);
  }
  cout << res;
  return 0;
}
