#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count = 0, count1 = 0, index, index1;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int temp;
    cin >> temp;
    if (temp % 2 == 0) {
      count++;
      index = i;
    } else {
      count1++;
      index1 = i;
    }
  }
  if (count > count1) {
    cout << index1 << endl;
  } else
    cout << index << endl;
}
