import Control.Applicative

main = do
    n <- readLn
    let h = n `div` 3600
    let m = (n - h * 3600) `div` 60
    let s = n `mod` 60

    putStr $ show h ++ ":"
    putStr $ show m ++ ":"
    putStrLn $ show s
