const
  maxn = 100000;
  max = 60000000;

var
  n, k, i, cnt, anscnt, ans : integer;
  a : array[1..maxn] of integer;
  c : array[1..max] of integer;

procedure add(t : integer);
begin
  t := t mod max + 1;
  if (c[t] = 0) then begin
    cnt := cnt + 1;
  end;
  c[t] := c[t] + 1;
end;

procedure delete(t : integer);
begin
  t := t mod max + 1;
  c[t] := c[t] - 1;
  if (c[t] = 0) then begin
    cnt := cnt - 1;
  end;
end;

begin
  reset(input, 'excursion.in');
  rewrite(output, 'excursion.out');
  read(n, k);
  cnt := 0;
  for i := 1 to k do begin
    read(a[i]);
    add(a[i]);
  end;
  anscnt := cnt;
  ans := 1;
  for i := k + 1 to n do begin
    read(a[i]);
    delete(a[i - k]);
    add(a[i]);
    if (cnt > anscnt) then begin
      anscnt := cnt;
      ans := i - k + 1;
    end;
  end;
  writeln(ans);
end.
 