m = [int(x) for x in input().split()]
w = [int(x) for x in input().split()]
hs, hu = [int(x) for x in input().split()]
k = [500, 1000, 1500, 2000, 2500]
c = 0
for x in range(len(k)):
    c+=max(0.3*k[x],((1-(m[x]/250))*k[x])-(50*w[x]))
print(int(c+(hs*100)-(hu*50)))