N,K=map(int,input().split()) P=list(map(int,input().split())) X=-1 for B in range(401): A=0 for p in P: if p>=B: A+=1 if A