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)
    other = (250-m[i])*x
    m[i] = max(0.3*x, (other - 250.0*50*w[i])/250.0)

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