m = list(map(int, input().split(" ")))
w = list(map(int, input().split(" ")))
h,sum,x = list(map(int, input().split(" "))),0,500
for i in range(5):
    sum+=max(0.3*x,(1-(m[i]/250))*x-(50*w[i]))
    x+=500
print(int(sum+(h[0]*100)-(h[1]*50)))