M = map(int, raw_input().split())
W = map(int, raw_input().split())
hs, hu = map(int, raw_input().split())
P = [500, 1000, 1500, 2000, 2500]
ans = 0
for i in range(5):
    ans += max((3 * P[i]) / 10, P[i] - (M[i] * P[i]) / 250 - 50 * W[i])

ans += 100 * hs - 50 * hu

print ans