using System;
using System.Collections.Generic;
using System.Linq;

namespace MyApp
{
    public class Program
    {
        public static void Main(string[] args)
        {
            string t = Console.ReadLine();
            int jj = 0;
            int n = t.Length;
            char[] chars = new char[n];
            foreach (char c in t)
            {
                chars[jj] = c;
                jj++;
            }
            int res = 0;
            bool eq = true;
            for(int i = 0; i < n; i++)
            {
                int j = n - 1 - i;
                if (i < n / 2)
                {
                    if (chars[i] != chars[j] || !eq)
                    {
                        if (eq) res++;
                        eq = false;
                        res++;
                    }
                }
            }
            if (n % 2 > 0) res++;
            Console.WriteLine(res);
        }
    }
}