import Data.Bits (popCount) import qualified Data.ByteString.Lazy.Char8 as LC import Data.Maybe (fromJust) unsafeReadInteger :: LC.ByteString -> Integer unsafeReadInteger = fst . fromJust . LC.readInteger main :: IO () main = print . popCount . unsafeReadInteger =<< LC.getContents