main = do
  s <- getLine
  putStrLn $ aux s

aux :: String -> String
aux str = (show h) ++ ":" ++ (show m) ++ ":" ++ (show s)
  where
    tm = read str :: Int
    s = tm `mod` 60 
    m = ((tm - s) `div` 60 ) `mod` 60
    h = (tm - s - 60*m) `div` 3600