m = map(int, raw_input().split())
w = map(int, raw_input().split())
h = map(int, raw_input().split())
s = 0
xx=[500,1000,1500,2000,2500]
for i in range(5):
    s+= max(0.3*xx[i],(1-m[i]/250.0)*xx[i]-50*w[i])
s+= h[0]*100
s-=h[1]*50
print int(s)
