#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i> N >> K; map m; for(i=1;i<=N;i++){ int a; cin >> a; a*=-1; m[a]++; } int ans=0,s=0; for(auto x : m){ ans++; s+=x.second; if(s>=K) break; } cout << ans << endl; return 0; }