m=list(map(int,input().split()))
w=list(map(int,input().split()))
h=list(map(int,input().split()))
s=0
for i in range(1,6):
    a=0.3*i*500
    b=(500*i)-(2*i*m[i-1])-(50*w[i-1])
    s+=max(a,b)
s+=h[0]*100
s-=h[1]*50
print(int(s))