marr = [int(x) for x in input().split()]
warr = [int(x) for x in input().split()]
hs,hu = map(int,input().split())
score =[500,1000,1500,2000,2500]
scor = 0
for  i in range(len(marr)):
    scor+=max(0.3*score[i],(1-(marr[i]/250))*score[i]-50*(warr[i]))
scor+=(100*hs)
scor-=50*(hu)

print(int(scor))
