{-# LANGUAGE BangPatterns #-}

module Main where

import Data.Char
import Control.Monad
import Control.Applicative


readInt :: IO Int
readInt = read <$> (input `seq` input)
    where input = do
            !c <- getChar
            if isDigit c
                then (c :) <$> input
                else return []

main = putStrLn . f =<< readInt
    where
        f n = let h = n `div` 3600
                  m = (n `div` 60) `mod` 60
                  s = n `mod` 60
              in show h ++ ":" ++ show m ++ ":" ++ show s
