N=map(float,raw_input().split())
W=map(int,raw_input().split())
h=map(int,raw_input().split())
add=0
for i in range(len(N)):
    x=500*(i+1)
    a=0.3*x
    b=(1-N[i]/250)*x-(50*W[i])
    add+=max(a,b)
print int(add+h[0]*100-h[1]*50)