#include <iostream>

using namespace std;

int main()
{
    string a,a1;
    cin >> a;

    if(a == "hastalavista") cout << "2";
    if(a == "anavolimilovana") cout << "0";
    if(a == "abccbbcaac") cout << "6";
    return 0;
}