a, b, s = gets.split a = 2340+a.to_i*60+b.to_i+s[3..-1].to_r*60 a = a.to_i puts "#{(a/60%24).to_s.rjust(2, ?0)}:#{(a%60).to_s.rjust(2, ?0)}"