<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;
bool cmp(int a, int b) { return a > b; }
int abss(int a) {
  if (a >= 0) return a;
  return -a;
}
int gqt(int n) {
  if (n < 0 || n >= 12) return 0;
}
struct jgt {
  int a, b, c, d, e;
};
bool flag[71720];
char a1[71720];
double x, y, sum1;
long long int n, i, m, la, a[71720], bb, cc, d, j, k, sum, sumend;
int main() {
  cin >> a1 + 1;
  la = strlen(a1 + 1);
  for (i = 1; i <= la; i++) {
    if (a1[i] >= 'A' && a1[i] <= 'Z') sum += a1[i] - 'A' + 1;
    if (a1[i] >= 'a' && a1[i] <= 'z') sum -= a1[i] - 'a' + 1;
  }
  cout << sum << endl;
  return 0;
}
