import math
m=list(map(int, input().split()))
w=list(map(int, input().split()))
a,b=map(int, input().split())
c=a*100-b*50
for i in range(5):
  c+=math.ceil(max(0.3*(i+1)*500, (1-m[i]/250)*(i+1)*500-50*w[i]))
print(c)