h, m = gets.chomp.split(":").map(&:to_i) m += 5 if m >= 60 m -= 60 h += 1 h %= 24 end puts [h, m].map{|n| sprintf("%02d", n)}.join(":")