calc :: Int -> (Int, Int, Int)
calc n = (h, m, s)
  where
    h = (n `div` 60) `div` 60
    m = (n `div` 60) `mod` 60
    s = n `mod` 60


main = do
  t <- getLine
  let (h, m, s) = calc $ read t
  putStrLn $ show h ++ ":" ++ show m ++ ":" ++ show s