line = gets
def cal(s)
  t = s.reverse
  a = 0
  b = 0
  l = s.length-1
  for i in 0..l
    if s[i] != t[i] then
      a = a+1
    elsif s[i] == t[i] then
      b = b+1
    end
  end
  if a+b == s.length then
    return a
  else
    return 0
  end
end
  
c =cal(line)/2
puts c