#include<bits/stdc++.h>
using namespace std;
const int N=1e5+10;
struct node{//设置struct
int num,pos;
}a[110];
bool cmp(node x,node y){//cmp排序
if(x.num!=y.num)return x.num<y.num;
else{
return x.pos<y.pos;
}
}
int main(){
int n;
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i].num;
a[i].pos=i;//标记pos
}
sort(a+1,a+n+1,cmp);
int k;
cin>>k;
int l=1,r=n;
int ans=-1;
while(l<=r){//2分查找
int mid=(l+r)/2;
if(a[mid].num==k){
ans=a[mid].pos;//记录当前ans;
r=mid-1;//往前找
}
else if(a[mid].num<k){
l=mid+1;
}
else{
r=mid-1;往后找
}
}
cout<<ans;
}