s = gets.chomp.chars
if s.size % 2 === 0
  center_idx = s.size / 2 - 1
else
  center_idx = s.size / 2
end

n = s.size - 1
arr = []
while center_idx < n
  arr << s[n]
  n -= 1
end
res = 0
s[0..center_idx].zip(arr).each do |front, back|
  res += 1 if front === back
end
puts arr.count - res
