n,k = map(int,input().split()) an = sorted(map(int,input().split()))[::-1] value = [an[0]] count=1 for i in an[1:]: if i>0 and count