#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0, cc = 0, cn = 0, ic = 0, in1 = 0;
  int pr;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> pr;
    if (pr % 2 == 1) {
      cn++;
      in1 = i;
    } else {
      cc++;
      ic = i;
    }
  }
  int answer = cn > cc ? ic : in1;
  cout << answer;
  return 0;
}
