#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
    newnode->next=NULL;
    if(head==NULL){
        head=newnode;
        tail=newnode;
    }
    else{
        tail->next=newnode;
        tail=newnode;
    }
}
int findpos(int val){
    node*temp=head;
    int pos=1;
    while(temp!=NULL){
        if(temp->data==val){
            return pos;
        }
        temp=temp->next;
        pos++;
    }
    return -1;
}
int main(){
    int n,num;
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%d",&num);
        create(num);
    }
    int val;
    scanf("%d",&val);
    int pos=findpos(val);
    if(pos==1){
        printf("-1");
    }
    else
      printf("-1");
      return 0;
}