n,m=map(int,input().split()) b=sorted(list(map(int,input().split()))) i=0 while m and i