#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int count1 = 0, count2 = 0, odd, even;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    if (x % 2 == 0) {
      count1++;
      even = i;
    } else {
      count2++;
      odd = i;
    }
  }
  count1 == 1 ? cout << even << endl : cout << odd << endl;
  return 0;
}
