p = [500, 1000, 1500, 2000, 2500]
r = lambda: list(map(int,input().split()))

score = 0
for x,m,w in zip(p,r(),r()):
    score += max(0.3*x,(1-m/250)*x-50*w)
hack, hack_wrong = r()
score += 100*hack - 50*hack_wrong
print (int(score))