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