module Main where

import Control.Monad.Trans.State

solve :: State Int String
solve = do
  h <- state (`divMod` 3600)
  m <- state (`divMod` 60)
  s <- state (`divMod` 1)
  return $ show h ++ ":" ++ show m ++ ":" ++ show s

main :: IO ()
main = do
  s <- readLn
  putStrLn $ evalState solve s

