#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  set<pair<int, int>> even;
  set<pair<int, int>> odd;
  for (int i = 0; i < n; ++i) {
    int e;
    cin >> e;
    if (e & 1) {
      odd.insert({e, i + 1});
    } else {
      even.insert({e, i + 1});
    }
  }
  if (even.size() == 1) {
    cout << begin(even)->second << '\n';
  } else {
    cout << begin(odd)->second << '\n';
  }
  return 0;
}
