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