h, m = gets.split(?:).map(&:to_i) m += 5 h += m / 60 h %= 24 m %= 60 puts [h, m].map{|s|('0'+s.to_s)[-2..-1]}.join(?:)