m = list(map(int , input().split()))
w = list(map(int , input().split()))
h = list(map(int , input().split()))
s = [500 , 1000 , 1500 , 2000 , 2500]

sum = 0

for i in range(5):
    f = 0.3 * int(s[i])
    l = (1 - m[i] / 250)*int(s[i]) - 50*w[i]

    if f>l:
        sum += f
    else:
        sum += l    


sum += (h[0] * 100 - h[1] * 50)
print(int(sum))
