m = [int(i) for i in input().split(" ")]
w = [int(i) for i in input().split(" ")]
hs, hu = [int(i) for i in input().split(" ")]
score = 0
for i in range(5):
  score += max(0.3 * 500 * (i+1), (1 - m[i]/250) * (500 * (i+1)) - 50 * w[i])
score += 100 * hs
score -= 50 * hu
print(int(score))