
solv xs = go xs [] 0 where
  go [] _ n = n
  go (x:xs) [] n = go xs [x] n
  go ('0':xs) ss@(s:ss') n
    | s=='0' = go xs ('0':ss) n
    | otherwise = go xs ss' (n+2)
  go ('1':xs) ss@(s:ss') n
    | s=='1' = go xs ('1':ss) n
    | otherwise = go xs ss' (n+2)

main = do
  s <- getLine
  print $ solv s
