m = [int(x) for x in input().split()]
w = [int(x) for x in input().split()]
x,y=[int(x) for x in input().split()]
z1 = max(0.3*500,((1-(m[0]/250))*(500-50*w[0])))
z2 = max(0.3*1000,((1-(m[1]/250))*(1000-50*w[1])))
z3 = max(0.3*1500,((1-(m[2]/250))*(1500-50*w[2])))
z4 = max(0.3*2000,((1-(m[3]/250))*(2000-50*w[3])))
z5 = max(0.3*2500,((1-(m[4]/250))*(2500-50*w[4])))
print(int((z1+z2+z3+z4+z5)+x*100-y*50))