#include using namespace std; int ans=0; string s; map ma; void solve(string now,int ind){ int N=s.size(); if(ind==N/2){ ma[now]++; return; } string i=now+s[N-1-ind]; string j=s[N-1-ind]+now; string k=now+s[ind]; string l=s[ind]+now; //cout << i << " " << j << " " << k << " " << l << endl; solve(i,ind+1); solve(j,ind+1); solve(k,ind+1); solve(l,ind+1); } int main(){ cin >> s; solve("",0); cout << ma.size() << endl; }