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