Program Zeroing;

Var A:array[1..100] of integer;
    N,N1,x:integer;


BEGIN
Read(N); {кiлькiсть елементiв масиву}
Read(N1);{елементи масиву}
x:=1;
while A[x]<=A[N] do
 begin
 if A[x]>A[x+1] then
  for x:=1 to N do n:=A[x]-A[x+1];

 if A[x+1]>A[x] then     for x:=1 to N do
                         begin
                         n:=A[x+1]-A[x];
                         end;
 end;

 N:=N+1;
 write(N);

END.
