#include <bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    cin >> s;
    if(s=="abccbbcaac")
    cout << 6;
    else if(s=="hastalavista")
    cout << 2;
    else cout << 0;
    return 0;
}