-- ITP1_1_D : watch
strtoint :: String -> Integer
strtoint xs = read xs :: Integer

watch :: Integer -> [Integer] 
watch n = (h:m:s:[])
    where
      h =  n `div` 3600
      m = (n `mod` 3600) `div` 60
      s = (n `mod` 3600) `mod` 60

watchtostr :: [Integer] -> String
watchtostr (h:m:s:[]) = show h ++ ":" ++ show m ++ ":" ++ show s

main = do
  str <- getLine
  putStrLn $ watchtostr $ watch $ strtoint str