{ll@n,@k,c;VI@p(n);rep(i,401){c=0;for(ll a:p)if(a>=i)c++;if(c<=k){wt(c);return 0;}}}