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