bits :: Int -> Int bits 0 = 0 bits n = bits (div n 2) + mod n 2 main = do n <- getLine print $ bits $ read n