代码:
#include<bits/stdc++.h>
using namespace std;
int main(){
int ans=0,a[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};
string b;
getline(cin,b);
for(int i=0;i<b.size();i++){
if(b[i]==' ') ans++;
else ans+=a[b[i]-97];
}
cout<<ans<<endl;
}