main = do line <- getLine
          putStrLn . watch $ line
          main

watch :: String -> String
watch secStr = let sec = read secStr :: Int
                   s = show . snd . sec2min $ sec
                   m = show . snd . min2hour . fst . sec2min $ sec
                   h = show . fst . min2hour . fst . sec2min $ sec
               in  h ++ ":" ++ m ++ ":" ++ s

sec2min :: Int -> (Int,Int)
sec2min s = s `quotRem` 60

min2hour :: Int -> (Int,Int)
min2hour m = m `quotRem` 60