h, m = gets.split(":").map(&:to_i) m += 5 if m >= 60 h += 1 end puts (h%24).to_s.rjust(2, '0') + ":" + (m%60).to_s.rjust(2, '0')