p=[500,1000,1500,2000,2500]
m=map(int,raw_input().split())
w=map(int,raw_input().split())
hs,hu=map(int,raw_input().split())
score=hs*100-hu*50
for i in xrange(5):
    v=max(0.3*p[i],(1-m[i]/250.0)*p[i]-50*w[i])
    score+=v
print int(score)
