<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 inf = 1e9 + 7;
inline int poww(int a, int b) {
  int base = a, ans = 1;
  while (b) {
    if (b & 1) ans = (ans * base) % inf;
    base = (base * base) % inf;
    b >>= 1;
  }
  return ans;
}
inline int fast_multiply(int a, int b) {
  int ans = 0, s = a;
  for (; b; b >>= 1, s = (s + s) % inf)
    if (b & 1) ans = (ans + s) % inf;
  return ans;
}
inline int read() {
  int p = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    p = p * 10 + c - '0';
    c = getchar();
  }
  return f * p;
}
int main() {
  int ans = 0;
  while (1) {
    char a = getchar();
    if (a == '\n') break;
    if (a >= 'A' && a <= 'Z')
      ans += a - 'A' + 1;
    else if (a >= 'a' && a <= 'z')
      ans -= a - 'a' + 1;
  }
  printf("%d", ans);
  return 0;
}
