#include<stdio.h>
//half-way search
int search(int a[],int low,int up,int key){
int i=(low+up)/2;
if(low>up) return -1;
else if(a[i]==key) return i;
else if(a[i]>key) return search(a,low,i-1,key);
else if(a[i]<key) return search(a,i+1,up,key);
}
int main(void){
int a[]={1,3,4,6,9};
int cnt=5;
printf("%d",search(a,0,cnt,6));
}
#include<stdio.h>
//order-way search from the beginning. get the smaller subscript.
int search(int a[],int n,int cnt,int key){
if(n==cnt) return -1;
else if(a[n]==key) return n;
else return search(a,n+1,cnt,key);
}
int main(void){
int n,a[200];
scanf("%d",&n);
int i,key;
for(i=0;i<n;i++) scanf("%d",&a[i]);
scanf("%d",&key);
if(search(a,0,n,key)==-1) printf("NULL");
else printf("%d",search(a,0,n,key));
}