#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  int a[2] = {0}, b[2] = {0};
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> t;
    a[t % 2]++;
    b[t % 2] = i + 1;
  }
  cout << (a[0] == 1 ? b[0] : b[1]) << endl;
  return 0;
}
