s = gets.chomp.split("")
size = s.size
count = 0
if size % 2 == 0
    until s == []
        if s.pop != s.shift
            count += 1
        end
    end
else
    until s.size == 1
        if s.pop != s.shift
            count += 1
        end
    end 
end
puts count