#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int n;
  int tiv;
  int even = 0;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    cin >> tiv;
    if (tiv % 2 == 0) even++;
    v.push_back(tiv);
  }
  if (even > 1) {
    for (int i = 0; i < v.size(); i++) {
      if (v[i] % 2 == 1) {
        cout << i + 1 << endl;
        return 0;
      }
    }
  } else if (even == 1) {
    for (int i = 0; i < v.size(); i++) {
      if (v[i] % 2 == 0) {
        cout << i + 1 << endl;
        return 0;
      }
    }
  }
  return 0;
}
