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

total+=100*hs-50*hu

print(int(total))