h ,m = gets.split(":").map(&:to_i) def digitize(num) if 0 <= num && num <= 9 return "0" + num.to_s else return num.to_s end end if (m+5 >= 60) && (h+1 >= 24) puts digitize(0) + ":" + digitize(m + 5 - 60) elsif (m+5 >= 60) puts digitize(h+1)+":"+ digitize(m + 5) else puts digitize(h)+":"+ digitize(m + 5) end