h,m=gets.split(?:).map(&:to_i) h = (h + (m + 5) / 60) % 24 m = (m + 5) % 60 puts "%02d:%02d" % [h, m]