#include <bits/stdc++.h>
using namespace std;
using pl = pair<long long, long long>;
using vll = vector<long long>;
using mll = map<long long, long long>;
using vpl = vector<pl>;
long long mod = 10000009;
void solve() {
  long long n, cnte = 0, cnto = 0, indo, inde;
  cin >> n;
  vll a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0) {
      cnte++;
      inde = i;
    }
    if (a[i] % 2 == 1) {
      cnto++;
      indo = i;
    }
  }
  if (cnto == 1) {
    cout << indo + 1 << "\n";
  } else {
    cout << inde + 1 << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
}
