#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, even = 0, odd = 0, epos, opos;
  cin >> n;
  int ara[n];
  for (int i = 1; i <= n; i++) {
    cin >> ara[i];
    if (ara[i] % 2 == 0) {
      even++;
      epos = i;
    } else {
      odd++;
      opos = i;
    }
  }
  if (even > odd)
    cout << opos << endl;
  else
    cout << epos << endl;
  return 0;
}
