<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;
template <typename T>
T sqr(T x) {
  return x * x;
}
int main() {
  string s;
  cin >> s;
  string A = " abcdefghijklmnopqrstuvwxyz";
  int res = 0;
  for (int i = 0; i < int(s.size()); i++) {
    char c = s[i];
    bool b1 = false;
    if ('@' < c) {
      b1 = true;
    }
    bool b2 = false;
    if ('[' > c) {
      b2 = true;
    }
    int i1 = b1 && b2;
    int i2 = A.find(tolower(c));
    if (i2 == A.npos) i2 = 0;
    bool b3 = false;
    if ('`' < c) {
      b3 = true;
    }
    bool b4 = false;
    if ('{' > c) {
      b4 = true;
    }
    int i3 = b3 && b4;
    long long t1 = i1 * i2;
    long long t2 = i2 * i3;
    long long m1 = t1 - t2;
    res += m1;
  }
  cout << res << endl;
  return 0;
}
