#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  vector<int> v, z;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int count = 0, sum = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] % 2 == 0) {
      count++;
      v.push_back(i + 1);
    } else {
      sum++;
      z.push_back(i + 1);
    }
  }
  if (sum > count)
    cout << v[0];
  else
    cout << z[0];
}
