time = list(map(int,input().split()))
wa = list(map(int,input().split()))
hacks = list(map(int,input().split()))

points = [500,1000,1500,2000,2500]
ans = 0

for i in range(1,6):
    a = 0.3*points[i-1]
    b = (1-time[i-1]/250)*points[i-1]-50*wa[i-1]
    ans+=max(a,b)

ans+=hacks[0]*100-hacks[1]*50


print(int(ans))

 	 				 		  		 			 		  	 		   	