//问题描述
//给出一个包含n个整数的数列,问整数a在数列中的第一次出现是第几个。
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int i;
Integer[]f = new Integer[n+1];
for ( i = 0; i < n; i++) {
f[i] = sc.nextInt();
}
int l = sc.nextInt();
for (int j = 1; j <=n+1; j++) {
if (l == f[i]) {
System.out.println(j);
break;
} else {
System.out.println("-1");
break;
}
}
}
}