m = list(map(int, input().split()))
w = list(map(int, input().split()))
h = list(map(int, input().split()))
ans = 0
for i in range(5):
  x = (i + 1) * 500
  ans += max(0.3 * x, (1 - m[i] / 250) * x - 50 * w[i])
ans += 100 * h[0] - 50 * h[1]
print(int(ans))
