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