main = getLine >>= putStrLn . solve . read

solve :: Int -> String
solve x = let h = x `div` 3600
              m = (x - h * 3600) `div` 60
              s = x - (h * 3600) - (m * 60)
           in (show h) ++ ":" ++ (show m) ++ ":" ++ (show s)
