#include using namespace std; using ll = long long; int main(){ string s; cin >> s; int n = s.size(); map mp; deque deq; for(int i = 0; i < (1<>j)&1)>0){ char c = deq.front(); t += c; deq.pop_front(); }else{ char d = deq.back(); t += d; deq.pop_back(); } } mp[t]++; } int ans = 0; for(auto x : mp){ if(x.second>=1) ans++; } cout << ans << endl; return 0; }