program mark;
var
s:array[0..1000] of longint;
i,j,k,m,n,aim,af,dang,ans:longint;
procedure qsort(l,r:Integer);
var
i,j,x,y:integer;
begin
i:=l; j:=r; x:=s[(l+r) div 2];
repeat
while s[i]>x do i:=i+1;
while x>s[j] do j:=j-1;
if i<=j then
begin
y:=s[i]; s[i]:=s[j]; s[j]:=y;
i:=i+1; j:=j-1;
end;
until i>j;
if l<j then qsort(l,j);
if i<r then qsort(i,r);
end;
begin
assign(input,'mark.in');reset(input);
assign(output,'mark.out');rewrite(output);
readln(n,m);
for i:=1 to n do readln(s[i]);
readln(aim);
ans:=s[aim];
qsort(1,n);
for i:=1 to n do if s[i]=ans then af:=i;
j:=af;
while s[j]=s[af] do
begin
dec(j);
end;
dang:=n div m;
af:=j+1;
if af mod dang=0 then ans:=af div dang
else ans:=(af div dang)+1;
writeln(ans);
close(output);
end.