solve ss = (show hour) ++ ":" ++ (show minute) ++ ":" ++ (show second)
  where
    hour = ss `div` 3600
    minute' = ss `mod` 3600
    minute = minute' `div` 60
    second = minute' `mod` 60

main = do
  s <- readLn :: IO Int
  putStrLn $ solve s

