s = gets.chomp
cnt = 0
loop do
  s_r = s.reverse
  if s_r == s then
    puts cnt
    break
  end
  s.length.times do |i|
    if s[i] != s_r[i] then
      s[i] = s_r[i]
      cnt += 1
      break
    end
  end
end