import Data.Char
main=do
 s<-map digitToInt<$>getLine
 let p=take (length s) (replicate [0,1])
 let q=take (length s) (replicate [1,0])
 print$length$filter(odd)(zipWith (+) s (if head s==0 then p else q)) 