f::String->String->Int->Int
f _ [] ans=ans
f [] (x:xs) ans=f (x:[]) xs ans
f (x:xs) (y:ys) ans
      |x=='0' && y=='1'=f xs ys (ans+2)
      |x=='1' && y=='0'=f xs ys (ans+2)
      |otherwise=f (y:x:xs) ys ans

main = do
       xs<-getLine
       putStrLn $ show $ f [] xs 0