#include<bits/stdc++.h>
using namespace std;
int main() {
string text;
getline(cin, text);
string one = "adgjmptw ";
string two = "behknqux";
string three = "cfilorvy";
int count = 0;
int size = text.size();
for (int i = 0; i < size; i++) {
if (one.find(text[i]) != string::npos) count += 1;
else if (two.find(text[i]) != string::npos) count += 2;
else if (three.find(text[i]) != string::npos) count += 3;
else count += 4;
}
cout << count << endl;
return 0;
}