import Data.List.Split main :: IO () main = do getLine a <- map parse . lines <$> getContents let (i, p) = (sum $ map fst a, sum $ map snd a) putStrLn $ showWithPoint(10^10 * i + p) parse :: String -> (Integer, Integer) parse = zipInt . splitWhen (== '.') zipInt :: [String] -> (Integer, Integer) zipInt [a, b] | head a /= '-' = (read a, readPoint b) | otherwise = (read a, -readPoint b) zipInt [a] = (read a, 0) readPoint :: String -> Integer readPoint = read . take 10 . (++ repeat '0') showWithPoint :: Integer -> String showWithPoint x | x < 0 = '-':showWithPoint (-x) | otherwise = (show (x `div` 10 ^ 10)) ++ "." ++ (show10 10 (x `mod` 10^10)) show10 :: Integer -> Integer -> String show10 0 _ = "" show10 d x = (show $ x `div` 10^(d-1)) ++ show10 (d - 1) (x `mod` 10^(d-1))