
m= [int(i) for i in raw_input().split(' ')]
w = [int(i) for i in raw_input().split(' ')]
hs, hu = [int(i) for i in raw_input().split(' ')]
s = [500,1000,1500,2000,2500]
score = 0
for i in range(len(w)):
        score+= max(0.3*s[i],(1-m[i]/250.0)*s[i]-50*w[i])
score+= hs*100
score-= hu*50
print int(score)
