sToHour :: (Integral a) => a -> a
sToHour x = x `div` 3600

sToMin :: (Integral a) => a -> a
sToMin x = x `div` 60 `mod` 60

sToSec :: (Integral a) => a -> a
sToSec x = x `mod` 60

makeStrf :: (Show a) => a -> a -> a -> String
makeStrf h m s = show h ++ ":" ++ show m ++ ":" ++ show s

main = do
  hoge <- getLine
  let h = sToHour $ read hoge
      m = sToMin $ read hoge
      s = sToSec $ read hoge
  putStrLn $ makeStrf h m s
