<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;
struct __s {
  __s() {
    srand(time(NULL));
    if (1) {
      ios_base::Init i;
      cin.sync_with_stdio(0);
      cin.tie(0);
    }
  }
  ~__s() {
    if (!1)
      fprintf(stderr, "Execution time: %.3lf s.\n",
              (double)clock() / CLOCKS_PER_SEC);
    long long n;
    cin >> n;
  }
} __S;
int main(void) {
  string s;
  cin >> s;
  long long ans = 0;
  for (long long i = 0; i < (long long)(s.size()); i++) {
    bool d1 = '@' < s[i];
    bool d2 = '[' > s[i];
    bool d3 = '`' < s[i];
    bool d4 = '{' > s[i];
    long long ii = (d1 && d2);
    long long j = ('A' <= s[i] && s[i] <= 'Z' ? s[i] - 'A' : s[i] - 'a') + 1;
    long long k = (d3 && d4);
    long long a = ii * j;
    long long b = j * k;
    long long c = a - b;
    ans += c;
  }
  cout << ans << '\n';
  return 0;
}
