#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100];
  cin >> n;
  int i, loce, loco, even = 0, odd = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0) {
      even++;
      loce = i;
    }
    if (a[i] % 2 == 1) {
      odd++;
      loco = i;
    }
  }
  if (odd > even) {
    cout << loce + 1;
  } else {
    cout << loco + 1;
  }
}
