import Data.List

main = do
	cs <- getLine
	let n = read cs :: Integer
	putStrLn $ showAnswer n

showAnswer :: Integer -> String
showAnswer n = concat $ intersperse ":" $ map (show . ($ n)) [hour, minute, second]

hour :: Integer -> Integer
hour = (`div` 3600)

minute :: Integer -> Integer
minute n = n `mod` 3600 `div` 60

second :: Integer -> Integer
second n = n `mod` 3600 `mod` 60
