m = map(int,raw_input().split())
w = map(int,raw_input().split())
p = [(i+1)*500 for i in xrange(5)]
s,u = map(int,raw_input().split())
ans = 0
for i in xrange(5):
	ans += max(p[i]/10*3,p[i]-m[i]*p[i]/250-50*w[i])
ans += 100*s - 50*u
print ans