a = *map(int, input().split()),
b = *map(int, input().split()),
c = (500, 1000, 1500, 2000, 2500)
hs, hu = map(int, input().split())
x = sum(max(0.3 * x, (1 - m / 250) * x - 50 * w) for m, w, x in zip(a, b, c)) + 100 * hs - 50 * hu
print(int(x))
