module Main where
main :: IO ()
main = do
s <- getLine
putStrLn $ toTime (read s :: Int)
toTime :: Int -> Int -> String
toTime s 0 = show s
toTime s n = show divSecond ++ ":" ++
toTime modSecond (n-1)
where divSecond = s `di` (60 ^ n)
modScond = s `mod` (60 ^ n)