#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, c = 0, d = 0, p, q, i;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> k;
    if (k % 2 == 0) {
      c++;
      p = i;
    } else {
      d++;
      q = i;
    }
  }
  if (d == 1) {
    cout << q;
  } else if (c == 1) {
    cout << p;
  }
  return 0;
}
