<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;
struct dbg_ {
  template <typename T>
  dbg_& operator,(const T& x) {
    cerr << x << ' ';
    return *this;
  }
} dbg_t;
struct cin_ {
  template <typename T>
  cin_& operator,(T& x) {
    cin >> x;
    return *this;
  }
} cin_;
template <typename T1, typename T2>
static inline ostream& operator<<(ostream& os, std::pair<T1, T2> const& p) {
  os << "{" << p.first << ", " << p.second << "}";
  return os;
}
int main() {
  string str;
  cin >> str;
  long long int ret = 0;
  for (auto i : str) {
    ret += (bool)isupper(i) * ((int)i - 'A' + 1) -
           (bool)islower(i) * ((int)i - 'a' + 1);
  }
  cout << ret << endl;
  return 0;
}
