scores = [500, 1000, 1500, 2000, 2500]
m = map(int, raw_input().split(' '))
w = map(int, raw_input().split(' '))
hs, hu = map(int, raw_input().split(' '))
ans = 100 * hs - 50 * hu
for i in range(5):
  ans += max(3 * scores[i] / 10, (250 - m[i]) * scores[i] / 250 - 50 * w[i])
print ans