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