solve :: Int -> IO ()
solve x = putStrLn (show h ++ ":" ++ show m ++ ":" ++ show s)
    where
        h = x `div` 3600
        m = x `div` 60 `mod` 60
        s = x `mod` 60

main :: IO ()
main = readLn >>= solve