<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;
const int M = INT_MAX;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int h(char c) {
  if (c >= 'a' && c <= 'z') return c - 'a' + 1;
  if (c >= 'A' && c <= 'Z') return c - 'A' + 1;
  return 0;
}
int main() {
  string s;
  cin >> s;
  int res = 0;
  for (int i = 0; i < s.length(); i++) {
    bool b1, b2;
    b1 = '@' < s[i];
    b2 = '[' > s[i];
    int x;
    if (b1 && b2)
      x = 1;
    else
      x = 0;
    bool b3, b4;
    b3 = '`' < s[i];
    b4 = '{' > s[i];
    int y;
    if (b3 && b4)
      y = 1;
    else
      y = 0;
    int xx, yy;
    xx = x * h(s[i]);
    yy = y * h(s[i]);
    res += xx - yy;
  }
  cout << res;
}
