s=0
a, b, c, d, e = map(int, input().split(' '))
ll = list(map(int, input().split(' ')))
xx, yy = map(int, input().split(' '))
pt = [500, 1000, 1500, 2000, 2500]
k = [a, b, c, d, e]
for i in range(5):
    s += max(0.3*pt[i], (1-(k[i])/250)*pt[i] - 50 * ll[i])

print(int(s + 100*xx-50*yy))
