m = list(map(int,input().split(' ')))
w = list(map(int,input().split(' ')))
h = list(map(int,input().split(' ')))
x = [500, 1000, 1500, 2000, 2500]
r = []
result = 0

for i in range(5):
  r.append(max(0.3 * x[i], ((1 - (m[i]/250)) * x[i]) - 50 * w[i]))

for i in r:
  result += i

print(int( result + h[0] * 100 - h[1] * 50))
							    	 		 	 	 				   		