m = [int(s) for s in input().split()]
w = [int(s) for s in input().split()]
h1, h2 = map(int, input().split())
a = (500,1000,1500,2000,2500)



sum = 0
for i in range(5):
    sum += max(0.3 * a[i], (1 - m[i]/250) * a[i] - 50 * w[i])

print(int(sum + 100 * h1 - 50 * h2))
