s=[] for i in range(int(input('n='))): s.append(float(input('x['+str(i)+']= '))) print(sum(i for i in s if i<s[-1] ))