program mark;
var
a:array[0..1001] of integer;
n,m,i,b,c,ans,x:integer;
procedure sort(l,r:integer);
var
i,j,x,temp:integer;
begin
i:=l;
j:=r;
x:=a[(l+r) div 2];
repeat
while a[i]<x do
inc(i);
while a[j]>x do
dec(j);
if i<=j then
begin
temp:=a[i];
a[i]:=a[j];
a[j]:=temp;
inc(i);
dec(j)
end
until i>j;
if i<r then sort(i,r);
if l<j then sort(l,j)
end;
begin
assign(input,'mark.in');
reset(input);
assign(output,'mark.out');
rewrite(output);
readln(n,m);
for i:=1 to n do
readln(a[i]);
readln(x);
b:=a[x];
sort(1,n);
for i:=1 to n do
if b=a[i] then
begin
c:=i;
break
end;
for i:=1 to m do
if (c>=(i-1)*(n div m)+1) and (c<=i*(n div m)) then
begin
ans:=i;
break
end;
writeln(ans);
close(input);
close(output)
end.