program ex;
type
ss=array[0..1000]of integer;
var
f:ss;
ans: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;
ans[1]:=1;
t:=1;
for i:=1 to n do
begin
if f[i]=f[i-1] then
begin
ans[i]:=ans[i-1];
inc(t);
end
else begin
ans[i]:=ans[i-1]+t;
t:=1;
end;
if f[i]=x then x:=ans[i];
end;
k:=0;
repeat
inc(k);
until ((k-1)*p+1<=x)and(x<=k*p);
writeln(k);
close(output);
end;
begin
init;
main;
end.