#include <stdio.h>
int main(){
    int num;
    scanf("%d", &num);
    int arr[num];
    for (int i = 0; i < num; ++i) {
        scanf("%d", &arr[i]);
    }
    int x, i;
    scanf("%d", &x);
    for (i = 0; i < num; ++i) {
        if(arr[i] == x){
            printf("%d\n", i);
            return 0;
        }
    }
    if(i == num){
        printf("-1\n");
    }
    return 0;
}