<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(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  long long res = 0;
  for (int i = 0; i < s.size(); i++) {
    char curl = s[i];
    bool r1, r2, r3, r4;
    r1 = ('@' < curl);
    r2 = ('[' > curl);
    r3 = ('`' < curl);
    r4 = ('{' > curl);
    bool s1, s2;
    s1 = r1 && r2;
    s2 = r3 && r4;
    int s1int, s2int;
    s1int = int(s1);
    s2int = int(s2);
    int idx = 0;
    if (curl >= 'A' and curl <= 'Z') {
      idx = curl - 'A' + 1;
    } else if (curl >= 'a' and curl <= 'z') {
      idx = curl - 'a' + 1;
    }
    int m1 = s1 * idx;
    int m2 = s2 * idx;
    res += m1 - m2;
  }
  cout << res << "\n";
  return 0;
}
