#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;
int main()
{
char c;
int n[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 },s=0;
while ((c = getchar()) != '\n') {
if (c == ' ')
s++;
else
s += n[(c - 97)];
}
cout << s;
}