unsigned n,l; int t=-1;
scanf("%u%u",&n,&l);
int* h = (int*)malloc(n * sizeof(int));
for(int i=1;i<n;i++)
   scanf("%d",&h[i]);
for(int i=1;i<n;i++)
   if(l>h[i]){
       t=i;
       break;
   }
printf("%d",t);