#include<bits/stdc++.h>
using namespace std;
char s[1000];
int main() {
gets(s);
int m=strlen(s);
int f=0;
for(int j=0;j<m;j++){
if(s[j]=='a'||s[j]=='j'||s[j]=='t'||s[j]=='d'||s[j]=='m'||s[j]=='w'||s[j]=='g'||s[j]=='p'||s[j]==' ')
f=f+1;
if(s[j]=='h'||s[j]=='q'||s[j]=='b'||s[j]=='k'||s[j]=='u'||s[j]=='e'||s[j]=='n'||s[j]=='x')
f=f+2;
if(s[j]=='i'||s[j]=='r'||s[j]=='c'||s[j]=='l'||s[j]=='v'||s[j]=='f'||s[j]=='0'||s[j]=='y')
f=f+3;
if(s[j]=='s'||s[j]=='z')
f=f+4;
}
cout<<f;
}