#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(void)
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int i;
string dish;
int total = 10;
cin >> dish;
for (i = 1; i < dish.length(); i++)
{
if (dish[i] == dish[i - 1])
{
total += 5;
}
else
{
total += 10;
}
}
cout << total << "\n";
return 0;
}