#include <bits/stdc++.h>
using namespace std;
int main() {
  int num, a;
  string s1, s2;
  cin >> num;
  int k = 0, j = 0;
  int c, d;
  for (int i = 1; i <= num; i++) {
    cin >> a;
    if (a % 2 == 0) {
      c = i;
      k++;
    } else {
      d = i;
      j++;
    }
  }
  if (j == 1) {
    cout << d << endl;
  }
  if (k == 1) {
    cout << c << endl;
  }
  return 0;
}
