```cpp
#include<bits/stdc++.h>
using namespace std;
int p[26]={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};
int f(char x){
if('a'<=x&&x<='z')return p[x-'a'];
if(x==' ')return 1;
return 0;
}
int main(){
char a;
int ans=0;
while(cin>>a){
ans+=f(a);
}
cout<<ans;
return 0;
}