<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;
int index(char c) {
  if (c > 96) return (c - 96);
  if (c == '.') return 0;
  if (c > 64) return (c - 64);
  if (c > 47) return (c - 47);
  return 0;
}
int main() {
  int i, res = 0, n;
  char c[51];
  cin >> c;
  for (n = 0; c[n]; n++)
    ;
  for (i = 0; i < n; i++) {
    int a1, b1, c1, d1;
    a1 = (64 < c[i] ? 1 : 0);
    b1 = (91 > c[i] ? 1 : 0);
    c1 = (96 < c[i] ? 1 : 0);
    d1 = (123 > c[i] ? 1 : 0);
    a1 = a1 && b1;
    c1 = c1 && d1;
    int tmp = (a1 - c1) * index(c[i]);
    res += tmp;
  }
  cout << res;
  return 0;
}
