import qualified Control.Arrow as Arrow import qualified Control.Monad as Monad import qualified Data.Char as Char import qualified Data.List as List import qualified Data.ByteString.Char8 as BSC8 import qualified Data.Vector.Unboxed as VU -- | 一行入力 Intリスト getInt :: IO [Int] getInt = List.unfoldr f <$> BSC8.getLine where -- f :: BSC8.ByteString -> Maybe (Int, BSC8.ByteString) f s = do (n, s') <- BSC8.readInt s return (n, BSC8.dropWhile Char.isSpace s') main :: IO () main = sum <$> getInt >>= print