import sys input = sys.stdin.readline N,M=map(int,input().split()) A=[int(input()) for i in range(N)] K=A[0] B=A[1:] B.sort() OK=len(B) NG=-1 while OK>NG+1: mid=(OK+NG)//2 now=K+B[mid] C=B[:mid]+B[mid+1:] ind=0 member=0 for i in range(len(C)-1,-1,-1): while indnow: member+=1 ind+=1 #print(mid,now,member,C) if member