#include <iostream>
using namespace std;
int main(int argc, char** argv) {
	ios_base::sync_with_stdio(false);
	string s;
	cin >>s;
	int br=0;
	for(int i=0;i<s.size()/2;i++)
	{
		if(s[i]!=s[s.size()-1-i])
		{
			br++;
		}
	}
	if(br==0)
	{
		cout <<1<<"\n";
	}
	else
	{
		cout <<br*2<<"\n";
	}
	return 0;
}