using System;

namespace Palindrom_Safl
{
    class Program
    {
        static bool Palindrom(string s)
        {
            int i, j;
            for (i = 0, j = s.Length - 1; i < j; i++, j--)
            {
                if (s[i] != s[j])
                {
                    return false;
                }
            }
            return true;
        }
        static void Main(string[] args)
        {
            string t = Console.ReadLine();
            int br = 1;
            if (Palindrom(t))
            {
                Console.WriteLine(br);
            }
            else
            {
                br = 0;
                char[] str = t.ToCharArray();
                for(int i=0;i<t.Length;i++)
                {
                    int l = i, d = t.Length - l - 1;
                    while(l<d)
                    {
                        if(str[l]!=str[d])
                        {
                            br++;
                        }
                        d--;
                        l++;
                    }
                }
                Console.WriteLine(br-1);
            }
        }
    }
}