program mark;
var
n,m,x,i,j,k,t:integer;
mc1,mc2:real;
a,b,c:array[1..1000]of integer;
begin
assign(input,'mark.in');
reset(input);
assign(output,'mark.out');
rewrite(output);
readln(n,m);
for i:=1 to n do
begin
readln(a[i]);
b[i]:=i;
end;
read(x);
for i:=1 to n-1 do
for j:=i+1 to n do
if a[j]>a[i] then
begin
t:=b[i];
b[i]:=b[j];
b[j]:=t;
end;
for i:=1 to n-1 do
for j:=1 to n do
if a[i]=a[j] then b[j]:=b[i];
for i:=1 to n do
for j:=1 to m do
begin
mc1:=(j-1)*(n/m)+1;
mc2:=j*(n/m);
if (b[i]>=((j-1)*(n/m)+1))and(b[i]<=(j*(n/m))) then c[i]:=j;
end;
write(c[x]);
close(input);
close(output);
end.