#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string check = "hello";
  int t, i, j = 0, k, l, m, n, count_even = 0, count_odd = 0,
            las_index_even = 0, las_index_odd = 0;
  cin >> n;
  int a[n];
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n; i++) {
    if (a[i] % 2 == 0) {
      count_even++;
      las_index_even = i;
    } else {
      count_odd++;
      las_index_odd = i;
    }
  }
  if (count_even == 1)
    cout << las_index_even + 1;
  else
    cout << las_index_odd + 1;
  return 0;
}
