#include <stdio.h>
#include <string.h>
int main(void)
{
char str[16] = { 0 };
int time[] = { 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6,
7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10 };
int res = 0;
scanf("%s", str);
for (int i = 0; i < strlen(str); i++)
res += time[str[i] - 'A'];
printf("%d \n", res);
return 0;
}
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
char str[16] = { 0 };
int time[] = { 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6,
7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10 };
int res = 0;
cin >> str;
for (int i = 0; i < strlen(str); i++)
res += time[str[i] - 'A'];
cout << res << '\n';
return 0;
}