1 #include <iostream>
2 #include <string>
3 using namespace std;
4 int j(string str){
5 int s=0;
6 if(str=="a" || str=="d" || str=="g" || str=="j" || str=="m" || str=="p" || str=="t" || str=="w"){
7 s+=1;
8 }
9 if(str=="b" || str=="e" || str=="h" || str=="k" || str=="n" || str=="q" || str=="u" || str=="x"){
10 s+=2;
11 }
12 if(str=="c" || str=="f" || str=="i" || str=="l" ||str=="o" || str=="r" || str=="v" || str=="y"){
13 s+=3;
14 }
15 if(str=="s" || str=="z"){
16 s+=4;
17 }
18 return s;
19 }
20 int main(int argc, char** argv) {
21 int cishu=0;
22 int n;
23 string z;
24 cin>>n;
25 int e=n;
26 string str;
27 for(int i=0;i<n;i++){
28 cin>>str;
29 for(int r=0;r<str.size();r++){
30 z=str.substr(r,1);
31 cishu+=j(z);
32 }
33 if(e!=1){
34 cishu++;
35 e--;
36 }
37 }
38 cout<<cishu;
39 return 0;
40 }