www.acmicpc.net/problem/5622
#include <iostream>
#include <string>
using namespace std;
int main() {
string input;
int result = 0;
cin >> input;
for(int i=0; i<input.size(); i++){
if(input.at(i) == 1){
result += 2;
}
else if(input.at(i) == 'A'||input.at(i) == 'B'||input.at(i) == 'C'){
result += 3;
}
else if(input.at(i) == 'D'||input.at(i) == 'E'||input.at(i) == 'F'){
result += 4;
}
else if(input.at(i) == 'G'||input.at(i) == 'H'||input.at(i) == 'I'){
result += 5;
}
else if(input.at(i) == 'J'||input.at(i) == 'K'||input.at(i) == 'L'){
result += 6;
}
else if(input.at(i) == 'M'||input.at(i) == 'N'||input.at(i) == 'O'){
result += 7;
}
else if(input.at(i) == 'P'||input.at(i) == 'Q'||input.at(i) == 'R' ||input.at(i) == 'S'){
result += 8;
}
else if(input.at(i) == 'T'||input.at(i) == 'U'||input.at(i) == 'V' ){
result += 9;
}
else if(input.at(i) == 'W'||input.at(i) == 'X'||input.at(i) == 'Y' ||input.at(i) == 'Z'){
result += 10;
}
}
cout << result << endl;
}