#include <iostream>
using namespace std;
void input(int a[],int n)
{
for(int i=0; i<n; i++)
cin>>a[i];
}
int binsearch(int a[],int n,int value)
{
int high=n-1,low=0,mid;
while(low<=high)
{
mid=(high+low)/2;
if(a[mid]==value)
return mid+1;
if(a[mid]>value)
low=mid+1;
else
high=mid-1;
}
return 0;
}
int main()
{
int a[20],n=0,value;
int position;
cin>>n;
input(a,n);
cin>>value;
position =binsearch(a,n,value);
cout<<position;
return 0;
}
#include <iostream>
using namespace std;
void input(int a[],int n)
{
for(int i=0; i<n; i++)
cin>>a[i];
}
int binsearch(int a[],int n,int value)
{
int high=n-1,low=0,mid;
while(low<=high)
{
mid=(high+low)/2;
if(a[mid]==value)
return mid+1;
if(a[mid]>value)
low=mid+1;
else
high=mid-1;
}
return 0;
}
int main()
{
int a[20],n=0,value;
int position;
cin>>n;
input(a,n);
cin>>value;
position =binsearch(a,n,value);
cout<<position;
return 0;
}