m = input().split()
w = input().split()
hs,hu = map(int,input().split())
value = 0
pont = 0
total = 0
for i in range(5):
  value+=500
  spont = 0.3*value
  pont=(1-(int(m[i])/250))*value-50*int(w[i])
  
  if pont > spont:
    total+=pont
  else:
    total+=spont

total+=100*hs-50*hu

print(int(total))