public static int find(int[] arr, int d,int i){
if(i>arr.length-1){
return -1;
}
if(arr[i]==d){
return i;
}
else{
return find(arr,d,i+1);
}
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] arr = new int[n];
for(int i =0;i<arr.length;i++){
arr[i] = sc.nextInt();
}
int digit = sc.nextInt();
int result = find(arr,digit,0);
System.out.println(result);
}