// editor3
#include<stdio.h>
#include<stdlib.h>

typedef struct node{
    int data;
    struct node *next;
}node;

node *head=NULL,*tail;

void create(int num){
    node *newnode=(node*)malloc(1*sizeof(node));
    newnode->data=num;
    newnode->next=NULL;
    
    if(head==NULL){
        head=newnode;
        tail=newnode;
    }else{
        tail->next=newnode;
        tail=newnode;
    }
}

void search(int x){
    node *temp=head;
    int pos = 1;
    
    while(temp!=NULL){
        if(temp->data==x)
            return pos;
        temp=temp->next;
        pos++;
    }
    return -1;
}
int main(){
    int n,num,i,x;
    scanf("%d",&n);
    if(n<=0 || n>100){
        printf("Invalid Input");
        return 0;
    }
    for(i=0;i<n;i++){
        scanf("%d",&num);
        create(num);
    }
    scanf("%d",&x);
    int result = search(x);
    printf("%d",result);
    return 0;
}