#include using namespace std; int main() { #ifdef DEBUG std::ifstream in("/home/share/inputf.in"); std::cin.rdbuf(in.rdbuf()); #endif string S; cin >> S; set s; int N = S.length(); for(int i = 0; i < (1 << N); i++) { string x = ""; int l = 0, r = N - 1; for(int j = 0; j < N; j++) { if(i & (1 << j)) { x.push_back(S[l]); l++; } else { x.push_back(S[r]); r--; } } s.insert(x); } cout << s.size() << endl; return 0; }