#include <bits/stdc++.h>
using namespace std;
int const MOD = 10e9 + 7;
int main() {
  int n;
  cin >> n;
  deque<int> jaja(n);
  int par, impar;
  par = impar = 0;
  for (int i = 0; i < n; i++) {
    cin >> jaja[i];
    if (jaja[i] % 2 == 0)
      par++;
    else
      impar++;
  }
  int answer;
  if (par > impar) {
    for (int i = 0; i < jaja.size(); i++)
      if (jaja[i] % 2 != 0) answer = i;
  } else {
    for (int i = 0; i < jaja.size(); i++)
      if (jaja[i] % 2 == 0) answer = i;
  }
  cout << answer + 1 << "\n";
  return 0;
}
