<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;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T bpow(T p, T e) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p);
    p = (p * p);
  }
  return (T)ret;
}
int toInt(string s) {
  int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
int toLlint(string s) {
  long long int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
const double eps = 1e-9;
int ts, kk = 1;
string s;
int q[4], r[4];
int clc(char x) {
  q[0] = ('@' < x);
  q[1] = ('[' > x);
  q[2] = ('`' < x);
  q[3] = ('{' > x);
  r[0] = (q[0] & q[1]);
  r[1] = (q[2] & q[3]);
  if (x >= 'A' && x <= 'Z')
    return x - 'A' + 1;
  else if (x >= 'a' && x <= 'z')
    return -(x - 'a' + 1);
  else
    return x = 0;
}
int a[20];
void rec(int i, int x) {
  if (i == s.size()) {
    if (x == 17) {
      for (i = 0; i < s.size(); i++) cout << a[i] << " ";
      puts("");
      getchar();
    }
    return;
  }
  for (int j = 0; j < s.size(); j++) {
    a[i] = j;
    rec(i + 1, x + clc(s[j]));
  }
}
int main() {
  int i, j, k;
  int rs = 0;
  cin >> s;
  for (i = 0; i < s.size(); i++) {
    rs += clc(s[i]);
  }
  cout << rs << '\n';
  return 0;
}
