st = gets.chomp.split("")
x = st.size - 1
count = 0
e = 0

loop do
if e >= x
  puts count
  exit
else
  if st[e] != st[x]
    count += 1
    e += 1
    x -= 1
  else
    e += 1
    x -= 1
  end
end
end
