program mark;
type
fxz=array[0..1000] of longint;
var
f1,f2:text;
ls,n,m,i,j,ans,x:longint;
num,ming:fxz;
begin assign(f1,'mark.in');
assign(f2,'mark.out');
reset(f1);rewrite(f2);
readln(f1,n,m);
for i:=1 to n do
readln(f1,num[i]);
readln(f1,x);
x:=num[x];
for i:=1 to n-1 do
for j:=i+1 to n do
if num[i]<num[j] then begin ls:=num[i];
num[i]:=num[j];
num[j]:=ls;
end;
num[0]:=-1;
for i:=1 to n do ming[i]:=i;
for i:=1 to n do if num[i]=num[i-1] then ming[i]:=ming[i-1];
for i:=1 to n do if num[i]=x then x:=ming[i];
for i:=1 to m do if ((i-1)*(n div m)+1<=x)and(i*(n div m)>=x) then writeln(f2,i);
close(f1);close(f2);
end.