#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define fix(n) cout<; const ll MOD = 1000000007; // 10^9 + 7 const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1}; const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1}; set se; void dfs(string s, string t, int left, int right) { if (left > right) { se.insert(t); return; } dfs(s, t + ctos(s[left]), left + 1, right); dfs(s, t + ctos(s[right]), left, right - 1); } void solve() { string s; cin >> s; dfs(s, "", 0, s.size() - 1); outl(se.size()); } signed main() { cin.tie(0); ios::sync_with_stdio(false); srand((unsigned)time(NULL)); fix(12); solve(); }