<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 = 1e9 + 7;
const int N = 100;
char str[N];
int n;
char a[4];
int Ch(char c) {
  if ('a' <= c && c <= 'z') return c - 'a' + 1;
  if ('A' <= c && c <= 'Z') return c - 'A' + 1;
  return 0;
}
int main() {
  a[0] = '@', a[1] = '[', a[2] = '`', a[3] = '{';
  scanf("%s", str);
  n = strlen(str);
  int ret = 0;
  for (int i = 0; i < n; i++) {
    int x = ((a[0] < str[i]) && (a[1] > str[i])) * (int)Ch(str[i]);
    int y = ((a[2] < str[i]) && (a[3] > str[i])) * (int)Ch(str[i]);
    ret += x - y;
  }
  printf("%d\n", ret);
  return 0;
}
