#include <iostream> using namespace std; int main() { int n; while (cin >> n) { int a[n]; for(int i=0;i<n;i++) { cin>>a[i]; } int x;cin>>x; int i; for( i=0;i<n;i++) { if(x==a[i]){cout<<i<<endl;break;} } if(i==n&&(x!=a[n-1]))cout<<"-1"<<endl; } }