<reponame>MisaelAugusto/uri<gh_stars>0
# -*- coding: utf-8 -*-

A = float(input())
B = float(input())
C = float(input())

MEDIA = (2 * A + 3 * B + 5 * C) / 10

print("MEDIA = %.1f" % (MEDIA))
# -*- coding: utf-8 -*-

A = float(input())
B = float(input())
C = float(input())

MEDIA = (2 * A + 3 * B + 5 * C) / 10

print("MEDIA = %.1f" % (MEDIA))
# -*- coding: utf-8 -*-