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