m = input().split()
for i in range(5):
    m[i] = int(m[i])
w = input().split()
for i in range(5):
    w[i] = int(w[i])
h = input().split()
for i in range(2):
    h[i] = int(h[i])
score = 0
for i in range(5):
    x = (i+1)*500
    score += max(0.3*x, (1-m[i]/250)*x-50*w[i])
score += h[0]*100+h[1]*-50
print(int(score))
