a=list(map(int,input().split()))
b=list(map(int,input().split()))
c,d=map(int,input().split())
e=[500,1000,1500,2000,2500]
f=[]
g=0

for i in range(5):
    f.append(max(0.3*e[i],((1-(a[i]//250))*e[i]))-50*b[i])

for j in f:
    g+=j

if(c>=0):
    g+=c*100
if(d>=0):
    g-=d*50

print(g)