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