#include <iostream>
using namespace std;
int main()
{
int n, m;
int a[10050] = {};
cin >> n;
for (int i = 1; i <= n; i++)
cin >> a[i];
cin >> m;
int ans = -1;
for (int i = 1; i <= n; i++)
if (a[i] == m)
{
ans = i;
break;
}
cout << ans;
return 0;
}