#include <stdio.h> int main() { int n; while ((scanf("%d", &n)) != EOF) { int m = n; int Arr[n]; int i = 0; Arr[n] = -1; while (n--) { scanf("%d", &Arr[i++]); } int number; scanf("%d", &number); int j; for (j = 0; j < m; j++) { if (Arr[j] == number) { printf("%d\n", j); break; } } if (j == m) { printf("-1\n"); } } return 0; }