a = float(input()) b = float(input()) mean = (a * 3.5 + b * 7.5) / (3.5 + 7.5) print("MEDIA = %.5f" % mean)