m = list(map(int, input().split()))
w = list(map(int, input().split()))
a, b = map(int, input().split())
c = 0
for i in range(5):
    c += max(0.3 * 500.0 * float(i + 1), (1.0 - float(m[i]) / 250) * 500.0 * float(i + 1) - 50.0 * float(w[i]))
print(int(c) + a * 100 - b * 50)