#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin>>s;
int i;
char c;
for(i=1;i<=sizeof(s);i++){
if((s.at(i)>='a'&&s.at(i)<='z')||(s.at(i)>='A'&&s.at(i) <='Z')){
c=c+4;
if((s.at(i)>'Z'&&s.at(i)<'\136')||(s.at(i)>'z')){
c=c-26;
}
}
}
cout<<c;
return 0;
}
//terminating with uncaught exception of type std::out_of_range: basic_string