#include using namespace std; int main(){ string s; cin >> s; int N = s.size(); map Map; int ans = 0; for(int i=0;i<(1<