s = gets.chomp
cnt=0
if s.length%2==0
  a=s[0..(s.length/2-1)]
  b=s[(s.length/2)..-1].reverse

  a.chars.each_with_index do |s,i|
    cnt+=1 if a[i] == b[i]
  end
  puts a.length-cnt

else
  c=s[0..(s.length/2-1)]
  d=s[(s.length/2+1)..-1].reverse

  c.chars.each_with_index do |s,i|
    cnt+=1 if c[i] == d[i]
  end
  puts c.length-cnt
end
