str = gets.split("")

left = 0
right = str.size-1
ans = 0

if str.size%2 == 0
    while left+1 != right
        if str[left] == str[right]
        else
            ans += 1
        end
        left += 1
        right -= 1
    end
    
    if str[left] == str[right]
        puts ans
    else
        puts ans+1
    end
else
    while left != right
        if str[left] == str[right]
        else
            ans += 1
        end
        left += 1
        right -= 1
    end
    
    if str[left] == str[right]
        puts ans
    else
        puts ans+1
    end
end
