import Data.List

main :: IO ()
main = do
    str <- getLine
    let num = read str :: Int
    let hour = num `div` 3600
    let minute = (num `mod` 3600) `div` 60
    let second = num `mod` 60
    putStrLn $ intercalate ":" $ map show [hour, minute, second]