#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, even(0), lastodd(0), lasteven(0);
  cin >> n;
  if (n >= 3 || n <= 100) {
    for (int i = 1; i <= n; i++) {
      int m;
      cin >> m;
      if (m % 2 == 0) {
        even++;
        lasteven = i;
      } else {
        even--;
        lastodd = i;
      }
    }
    cout << (even > 0 ? lastodd : lasteven) << endl;
  }
  return 0;
}
