<reponame>matheusscheu/AED2
a = float(input())
b = float(input())
media = (a*3.5 + b * 7.5) /11
print("MEDIA = %.5f"% media)
a = float(input())
b = float(input())
media = (a*3.5 + b * 7.5) /11
print("MEDIA = %.5f"% media)