#include<bits/stdc++.h>
#define LL unsigned long long
#define BEG freopen("mark.in","r",stdin);freopen("mark.out","w",stdout);
#define END fclose(stdin);fclose(stdout);
using namespace std;
const int N=200005,M=1005;
int n,m;
int s[M],tar;
int cmp(int a,int b){
return a>b;
}
int main(){
BEG
cin>>n>>m;
int k=n/m;
for(int i=0;i<n;i++)
cin>>s[i];
cin>>tar;
tar=s[tar-1];
sort(s,s+n,cmp);
if(s[0]==tar)
cout<<1;
else
for(int i=1,j=1,l=1;i<n;i++){
while(j>=k){
j-=k;
l++;
}
if(s[i]!=s[i-1]){
j++;
}
if(s[i]==tar){
cout<<l;
break;
}
}
END
return 0;
}