#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int n,x,i;
	int arr[201];
	while (cin >> n)
	{
		for (int j = 0; j < n; j++)
		{
			cin >> arr[j];
		}
		cin >> x;
		for ( i = 0; i < n; i++)
		{
			if (arr[i] == x)
			{
				cout << i<<endl;
				break;
			}
		}
		if (i == n)
		{
			printf("-1");
		}
	}
	return 0;
}