module Main where

import Data.Functor
import Data.List

main :: IO ()
main = do
  { [ss] <- getInts
  ; let (mm,s) = ss `divMod` 60
  ; let (h,m)  = mm `divMod` 60
  ; putStrLn (intercalate ":" (map show [h,m,s]))
  }

getInts :: IO [Int]
getInts = do
  { line <- getLine
  ; let ints = map readInt (words line)
  ; return ints
  }

getInts' :: IO [Int]
getInts' = do
  { line <- getLine
  ; return (map readInt (words line))
  }

getInts'' :: IO [Int]
getInts'' = map readInt . words <$> getLine

readInt :: String -> Int
readInt = read