#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, o = 0, e = 0, x, y;
  cin >> n;
  int ara[n + 5];
  for (int i = 1; i <= n; i++) {
    cin >> ara[i];
    if (ara[i] % 2 == 0) {
      e++;
      x = i;
    } else {
      o++;
      y = i;
    }
  }
  if (e > o) {
    cout << y << endl;
  } else
    cout << x << endl;
}
