def func(x, m, w):
    #print x, m, w
    a=.3*x
    b=(1.0-m/250.0)*x-50.0*w
    #print 'a', a
    #print 'b', b
    return max(a,b)

x=[500, 1000, 1500,2000, 2500]
m=map(int, raw_input().split())
w=map(int,raw_input().split())
h=map(int, raw_input().split())
sum=0
for i in range(0,5):
    temp=func(x[i], m[i],w[i])
    sum+=temp
    #print 'found ' , temp
    #print 'sum is now', sum

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