main :: IO ()
main = do 
  n <- getLine
  let time = read n :: Int
  putStrLn $ show ( hour time ) ++ ":" ++ show (minute time)  ++ ":" ++ show (second time) 


hour :: Int -> Int
hour time = time `div` 3600

minute :: Int -> Int
minute time = (time - (hour time) * 3600 ) `div` 60

second :: Int -> Int
second time = time `mod` 60