main = do
  a <- getLine
  let aaa = (\x -> [(length x)-1,last x]) [x| x<- [(read a),((read a)-3600)..0]]
  let bbb = (\x -> [(head aaa),(length x)-1,last x]) [x| x<- [(last aaa),((last aaa)-60)..0]]
  let ccc = tail $ foldl (\acc x -> acc ++ ":" ++ show x) "" bbb

  putStrLn $ ccc 
