#include<bits/stdc++.h>
using namespace std;
int main(){
char c[27],a='a';
for(int i=0;i<26;i++){
c[i]=a;
a++;
}
c[26]=' ';
int times[27]={1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,4,1,2,3,1,2,3,4,1},sum,charcnt;
string str;
cin>>str;
charcnt=str.size();
for(int i=0;i<charcnt;i++){
for(int j=0;j<27;j++){
if(str[i]==c[j]){
sum+=times[j];
}
}
}
cout<<sum;
return 0;
}