<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;
#pragma GCC target("avx2")
#pragma GCC optimization("O2")
#pragma GCC optimization("unroll-loops")
const long double ERR = 1e-5;
const int MOD = 1e9 + 7;
bool areEqual(long double _n1, long double _n2) {
  return fabs(_n1 - _n2) < ERR;
}
int alphabetIndex(char);
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string str;
  cin >> str;
  int RES = 0;
  for (char c : str) {
    int firstAND = bool('@' < c) && bool('[' > c);
    int seconAND = bool('`' < c) && bool('{' > c);
    int index = alphabetIndex(c);
    RES += firstAND * index - seconAND * index;
  }
  cout << RES << '\n';
}
int alphabetIndex(char c) {
  if (c == '.') return 0;
  c = toupper(c);
  return c - 'A' + 1;
}
