import Data.List
main = do
  time <- readLn
  let hms = [getHourFrom time, getMinuteFrom time, getSecondFrom time]
  putStrLn $ intercalate ":" $ map show hms

getHourFrom :: Int -> Int
getHourFrom time = div time 3600

getMinuteFrom :: Int -> Int
getMinuteFrom time = div (mod time 3600) 60

getSecondFrom :: Int -> Int
getSecondFrom time = mod time 60