module Main where

main = interact (g . add . f)

f :: String -> [Int]
f x = map read (words x)

add :: [Int] -> Int
add (a:b:rest) = (a+b)
add _ = error "Not enough ints"

g :: Int -> String
g x =  "The result is " ++ (show x) ++ "\n"