import math
m = list(map(int, input().split()))
w = list(map(int, input().split()))
hs, hf = map(int, input().split())
res = 0
x = 500
for i in range(len(m)):
    res += max(0.3 * x, (1 - m[i] / 250) * x - 50 * w[i])
    x += 500
res += hs * 100
res -= hf * 50
print(math.trunc(res))
