tax :: Int -> Int -> Int tax rate price = truncate $ price' * (rate' / 100) where rate' = fromIntegral rate price' = fromIntegral price main :: IO () main = getNums >>= print . f where getNums = map read . words <$> getLine :: IO [Int] f [a,b] = a + tax b a