m = raw_input().split()
w = raw_input().split()
h = raw_input().split()
h[0]=int(h[0])
h[1]=int(h[1])
i=0
x=[500, 1000,1500,2000,2500]
t1=[]
t2=[]
sum = 0
while i<5:
    t1.append( 0.3*x[i])
    m[i]=int(m[i])
    w[i]=int(w[i])
    t2.append((1-m[i]/250.0)*x[i]  -  50*w[i])
    sum += max(t1[i],t2[i])
    i+=1

hac = 100*h[0] -50*h[1]
sum += hac
print int(sum)
