#include #include #include #include #include #include #include #include #include #include #include #include #define vll vector #define vvvl vector #define vvl vector> #define VV(a, b, c, d) vector>(a, vector(b, c)) #define VVV(a, b, c, d) vector(a, vvl(b, vll (c, d))); #define re(c, b) for(ll c=0;c> s; ll n = s.size(); set st; for(int i=0;i<(1<>j)&1) t += s[l], l++; else t += s[n-1-r], r++; } st.insert(t); } std::cout << st.size() << '\n'; return 0; }