program ex;
type
ss=array[0..1000]of integer;
var
f:ss;
n,m,x,p:integer;
procedure init;
var
i,j:integer;
flag:boolean;
begin
assign(input,'mark.in');
assign(output,'mark.out');
reset(input);
rewrite(output);
readln(n,m);
p:=n div m;
for i:= 1 to n do read(f[i]);
readln(x);
x:=f[x];
close(input);
end;
procedure main;
var
i,j,k,y,t,w:integer;
begin
for i:=1 to n-1 do
for j:=i+1 to n do
if f[i]<f[j] then
begin
f[i]:=f[i]+f[j];
f[j]:=f[i]-f[j];
f[i]:=f[i]-f[j];
end;
k:=1;
t:=1;w:=1;
y:=f[1];
for i:=1 to n do
begin
if f[i]=y then inc(w)
else begin
y:=f[i];
t:=t+w;
end;
if t>=(k+1)*p then inc(k);
if f[i]=x then begin
writeln(k);
close(output);
exit;
end;
end;
end;
begin
init;
main;
end.