#include<bits/stdc++.h>
using namespace std;
string str;
int ans1( string s) {
int cnt=0;
while(true) {
if((s.size()-1)%2==0) {
int len1=(s.size()-1)/2;
string s2;
string s3;
s2=s.substr(0,len1);
s3=s.substr(len1,s.size()-1);
reverse(s3.begin(),s3.end());
if(s3==s2){
cnt++;
s=s2;
}
else continue;
} else {
break;
}
}
return cnt;
}
int main() {
cin>>str;
cout<<ans1(str);
return 0;
}