#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

const int MAX_NUM = 200;

int num[MAX_NUM];

/**
 * 找x哈尔滨工业大学
 * @return
 */
int main() {
    int n;
    while (cin >> n) {
        for (int i = 0; i < n; ++i) {
            cin >> num[i];
        }
        int x;
        cin >> x;
        int ans = -1;
        for (int j = 0; j < n; ++j) {
            if (num[j] == x) {
                ans = j;
                break;
            }
        }
        cout << ans << endl;
    }
    return 0;
}