#include <bits/stdc++.h>
using namespace std;
int main() {
  int testcase;
  int counter[1000];
  int modulo[2] = {};
  int checker;
  cin >> testcase;
  for (int i = 0; i < testcase; i++) {
    int x;
    cin >> x;
    counter[i] = x % 2;
    modulo[counter[i]]++;
  }
  if (modulo[0] < modulo[1])
    checker = 0;
  else
    checker = 1;
  for (int i = 0; i < testcase; i++) {
    if (counter[i] == checker) {
      cout << i + 1;
      return 0;
    }
  }
}
