
MP = [500, 1000, 1500, 2000, 2500]

M = map(int, raw_input().split(' '))
U = map(int, raw_input().split(' '))
hs, hu = map(int, raw_input().split(' '))

g = lambda x, m, w : max(0.3*x, (1-(m/250.0))*x - 50*w)

l = []
for i in range(5):
    l.append(g(MP[i], M[i], U[i]))

score = 100 * hs - 50 * hu + sum(l)
print int(score)


