m = map(int, raw_input().split())

w = map(int, raw_input().split())

sh, ush = map(int, raw_input().split())

for i in xrange(5):
    x = 500*(i+1)
    m[i] = max(0.3*x, (((250-m[i])*x)/250) - 50*w[i])

print sum(m)+100*sh-50*ush
