

solver::String->Int
solver str = let counter = (length.(filter (\ (x,y) -> x /= y )).(zip str).concat.repeat) in
             minimum (map counter ["01","10"])

main::IO()
main=print.solver=<<getLine
