timeHour, timeMinute = gets.split(":").map(&:to_i) minute = timeHour*60 + timeMinute + 5 hour = minute/60 minute = minute%60 print hour print ":" print minute