str = gets.chomp
int = str.length
count = 0
if int.odd?
    check = (int - 1) / 2
else
    check = int /2
end

check.times do |i|
    if  str[i] !=  str[-(i +1 )]
        count += 1
    end
end

puts count