import Text.Printf main :: IO () main = do n <- getLine let (d, c) = f n printf "%02d:%02d" d c f :: String -> (Int, Int) f n = (d, c) where (h, m) = ((read :: String -> Int) (take 2 n), (read :: String -> Int) (drop 3 n)) a = h * 60 + m + 5 (b, c) = a `divMod` 60 d = b `mod` 24