m = list(map(int,input().split()))
w = list(map(int,input().split()))
hsu = list(map(int,input().split()))
num = 0
for i in range(5):
    num += max(((i+1) * 500) * 0.3,(1.0-m[i]/250.0)* (i+1) * 500.0 - 50.0 * w[i])
num += hsu[0]*100
num -= hsu[1]*50
print(int(num))
