X = [2, 4, 6, 8, 10]
M = [int(i) for i in raw_input().split(' ')]
W = [int(i) for i in raw_input().split(' ')]
SH, UH = [int(i) for i in raw_input().split(' ')]

answer = (SH*100)-(UH*50)

for i in xrange(5):
    answer += max(75*X[i], (250-M[i])*X[i] - 50*W[i])

print answer
