<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;
inline long long IN() {
  long long x = 0;
  int ch = getchar(), f = 1;
  while (!isdigit(ch) && (ch != '-') && (ch != EOF)) ch = getchar();
  if (ch == '-') {
    f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 1) + (x << 3) + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline void OUT(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10)
    OUT(x / 10), putchar(x % 10 + '0');
  else
    putchar(x + '0');
}
char s[55];
int main() {
  scanf("%s", s + 1);
  int Ret = 0, n = strlen(s + 1);
  for (int i = 1; i <= n; i++) {
    if (s[i] == '.') continue;
    int Fr = 0, Sc = 0;
    if (s[i] > '@' && s[i] < '[') Fr = s[i] - 'A' + 1;
    if (s[i] > '`' && s[i] < '{') Sc = s[i] - 'a' + 1;
    Ret += Fr - Sc;
  }
  OUT(Ret);
}
