x = [500, 1000, 1500, 2000, 2500]
m = list(map(float, input().split()))
w = list(map(int, input().split()))
score = 0
l = list(map(int, input().split()))
score += l[0]*100
score -= l[1]*50
for i in range(5):
    score += max([0.3*x[i], (1-m[i]/250)*x[i]-50*w[i]])
print(int(score))
