m = list(map(int,input().split()))
w = list(map(int,input().split()))
hs,hu = map(int,input().split()); ans = hs*100-hu*50
x = [500,1000,1500,2000,2500]
for i in range(5): ans += max(0.3*x[i],(1-(m[i]/250))*x[i]-50*w[i])
print(int(ans))