m = list(map(int, input().split()))
w = list(map(int, input().split()))
scs, fld = map(int, input().split())
ans = 0
contest = [500, 1000, 1500, 2000, 2500]
i = 0
for problem in contest:
    ans += max(0.3 * problem, (1 - m[i] / 250) * problem - 50 * w[i])
    i += 1
print(round(ans + 100 * scs - 50 * fld))
