#include<stdio.h>
#include<ctype.h>
int main(void)
{
int a[26] = { 1, 3, 3, 2, 1, 4, 2, 4, 1, 8,
5, 1, 3, 1, 1, 3, 10, 1, 1, 1,
1, 4, 4, 8, 4, 10 };
int sum = 0;
char ch;
while ((ch = getchar())!= '\n')
{
ch=tolower(ch);
sum += a[ch - 97];
}
printf("%d", sum);
}