#include #include #include #include #include #include #include #include using namespace std; #define rep(i,n) for (int i = 0; i < (n); i++) #define vi vector #define vll vector #define all(x) x.begin() , x.end() #define pb push_back() #define eb emplace_back() typedef long long ll; typedef long double ld; //const int MOD = 1e9 + 7; //const int MOD = 998244353; const ll MOD = 1e9 + 7; //const ll MOD = 998244353; const ld PI = 3.14159265358979; const int INF = 1001001001; const ll LINF = 1001001001001001001; const int MX = 220000; ll gcd (ll a , ll b) { if (a < b) swap(a , b); if (a % b == 0) return b; else return gcd(b , a % b); } ll lcm (ll a , ll b) { return a / gcd(a , b) * b; } ll lin() { ll x; scanf("%lld" , &x); return x; } int in() { int x; scanf("%d" , &x); return x; } void io_setup() { cout << fixed << setprecision(20); } ll modpow (ll x , ll p) { ll ret = 1; while (p) { if (p % 2 == 1) { ret *= x; ret %= MOD; } x *= x; x %= MOD; p /= 2; } return ret; } ll moddiv (ll a , ll b) { return a * modpow(b , MOD - 2) % MOD; } ll modsub (ll a , ll b) { if (a >= b) return (a - b) % MOD; else return (MOD - a + b); } vll fact(MX); vll factinv(MX); void init_fact () { fact[0] = 1; for (int i = 1; i < MX; i++) { fact[i] = 1LL * i * fact[i - 1] % MOD; } for (int i = 0; i < MX; i++) { factinv[i] = modpow(fact[i] , MOD - 2); } } ll nCk (ll n , ll k) { return ((fact[n] * factinv[k] % MOD) * factinv[n - k] % MOD); } bool is_prime (int x) { if (x == 2 || x == 3 || x == 5 || x == 7) { return true; } for (ll i = 2; i*i <= x; i++) { if (x % i == 0) { return false; } } return true; } vi prime(MX , 0); void init_prime() { } string s; int n; map mp; void dfs(string t , int x , int y) { if (int(t.size()) == n) { mp[t]++; return; } if (x + 1 < n) dfs(t + s[x] , x + 1 , y); if (y - 1 >= 0) dfs(t + s[y] , x , y - 1); return; } int main() { io_setup(); //init_fact(); cin >> s; string t; t = ""; n = s.size(); int x = 0; int y = n - 1; dfs(t , x , y); cout << mp.size() << endl; return 0; }