m = map(int, raw_input().split())
w = map(int, raw_input().split())
h = map(int, raw_input().split())
x = [500, 1000, 1500, 2000, 2500]

sc = 0.0
for i in range(len(x)):
    sc += max(0.3*float(x[i]), (1.0 - float(m[i])/250.0) * float(x[i]) - 50.0*w[i])
sc += 100.0*h[0] - 50.0*h[1]
print int(sc)