#include "bits/stdc++.h" using namespace std; int main() { string S; cin >> S; set SET; for (int i = 0; i < 1 << S.size(); i++) { int X = i, Y[10]; for (int j = 0; j < S.size(); j++) { Y[j] = X % 2; X /= 2; } int L = 0, R = S.size() - 1; string T = ""; for (int j = 0; j < S.size(); j++) { if (Y[j] == 0) { T = T + S[L]; L++; } else { T = T + S[R]; R--; } } SET.insert(T); } cout << SET.size() << endl; }