program zadatak;
var
  L,M,  n, i,c: integer;
begin
  read(L,n);
  c:=-1;
  for i := 1 to n do
  begin
    read(M);
    if L > M then
    begin
      c:= i;
      break;
    end;
  end;
  writeln(c);
end.