program mark;
var
y,i,j,n,m,ans:longint;
sz:array[0..10000]of longint;
begin
assign(input,'mark.in');
assign(output,'mark.out');
reset(input);
rewrite(output);
readln(n,m);
for i:=1 to n do
readln(sz[i]);
readln(y);
y:=sz[y];
for i:=1 to n-1 do
for j:=i+1 to n do
if sz[j]>sz[i] then begin
sz[0]:=sz[j];
sz[j]:=sz[i];
sz[i]:=sz[0];
end;
for i:=1 to n do
if sz[i]=y then begin
ans:=i div (n div m);
if i mod (n div m) <>0 then ans:=ans+1;
writeln(ans);
break;
end;
close(input);
close(output);
end.