
x = [i*500 for i in xrange(1,6)]

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

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


ret = h[0]*100-h[1]*50

for x,m,w in zip(x,m,w):
	ret += max(3*x/10,x-m*x/250-50*w)

print ret