h, m = gets.not_nil!.split(":").map(&.to_i) m += 5 if m >= 60 m -= 60 h += 1 end if h >= 24 h -= 24 end puts "%02d:%02d" % [h, m]