import Control.Applicative
import Text.Printf

main :: IO ()
main = do
  s0 <- readLn
  let (h, m, s) = solve s0
  printf "%d:%d:%d\n" h m s

solve :: Int -> (Int, Int, Int)
solve s0 = (h, m, s)
  where
    (m0, s) = s0 `quotRem` 60
    (h , m) = m0 `quotRem` 60

