program chengjifendang;
var
x,i,j,n,m,jilu,t,k:integer;
a,b,c:array[0..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]);
c[i]:=i
end;
readln (x);
k:=n div m;
for i:=1 to n-1 do
for j:=i+1 to n do
if a[i]<a[j] then
begin
jilu:=a[i];
a[i]:=a[j];
a[j]:=jilu;
jilu:=c[i];
c[i]:=c[j];
c[j]:=jilu
end;
for i:=1 to n do
begin
t:=t+1;
if a[i]=a[i-1] then
b[i]:=b[i-1]
else
b[i]:=t
end;
for i:=1 to n do
if x=c[i] then
if b[i]mod k=0 then
writeln (b[i] div k)
else
writeln (b[i] div k+1);
close (input);
close (output)
end.