import re

m = [int(n) for n in re.split("\s+", input())]
w = [int(n) for n in re.split("\s+", input())]
h = [int(n) for n in re.split("\s+", input())]
x = [500, 1000, 1500, 2000, 2500]

print(int(sum(list(map(lambda i: max(
    0.3*i[0], (1-(i[1]/250))*i[0]-(50*i[2])), [i for i in zip(x, m, w)])))+((h[0]*100)-(h[1]*50))))
