const
  maxn = 100000;
var
  a, cnt, sum : array[1..maxn] of longint;
  n, k, imax, i, j : longint;
begin
  assign(input, 'army3.in');
  assign(output, 'army3.out');
  reset(input);
  rewrite(output);
  read(n, k);
  for i := 1 to n do begin
    read(a[i]);
  end;
  for i := 1 to n do begin
    cnt[i] := 0;
    for j := 1 to n do begin
      if (a[j] < a[i]) then
        cnt[i] := cnt[i] + 1;
    end;
  end;
  sum[1] := 0;
  for i := 1 to k do begin
    sum[1] := sum[1] + cnt[i];
  end;
  imax := 1;
  for i := 2 to n - k + 1 do begin
    sum[i] := sum[i - 1] + cnt[i + k - 1] - cnt[i - 1];
    if (sum[i] > sum[imax]) then
      imax := i;
  end;
  writeln(imax);
end.
