z=list(map(int,input().split()))
x=list(map(int,input().split()))
c=list(map(int,input().split()))
a=sum( [max(.3*(500*(i+1)),((1-(z[i]/250))*(500*(i+1))-(50*x[i]))) for i in range(5)])
print(int(a+(c[0]*100)-(c[1]*50)))