M = list(map(int,input().split()))
W = list(map(int,input().split()))
t,f = map(int,input().split())
X = 0
for i in range(5):
    x = (i + 1)*500
    X += max(0.3*x, (1 - M[i]/250)*x - 50*W[i])
X += t*100 - f*50
print(int(X))