#include #define rep(i, n) for(long long i = 0; i < n; i++) #define ALL(v) (v).begin(), (v).end() #define rALL(v) (v).rbegin(), (v).rend() using namespace std; using lint = long long; int main() { string s; cin >> s; set st; auto f = [&](auto f, string now, int l, int r) -> void { if (l == r) { st.insert(now); return; } f(f, now + s[l], l + 1, r); f(f, now + s[r - 1], l, r - 1); }; f(f, "", 0, (int)s.size()); cout << st.size() << endl; }