main :: IO ()
main = do
    xs <- getLine
    putStrLn $ show $ pittan01 xs
    
pittan01 :: String -> Int
pittan01 [] = 0
pittan01 (x:xs) = pikosan x + pittan01 xs

pikosan :: Char -> Int
pikosan '1' = 1
pikosan _ = 0