m=map(int,raw_input().split())
w=map(int,raw_input().split())
hs,hu=map(int,raw_input().split())
s=0
for i in xrange(5):
    x=(i+1)*500
    s+=int(max(0.3*x,x-x*m[i]/250-50*w[i]))
s+=hs*100-hu*50
print s