#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[100], n, counter_even(0), counter_odd(0), pos_even, pos_odd;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    if (arr[i] % 2 != 0) {
      ++counter_odd;
      pos_odd = i;
    }
    if (arr[i] % 2 == 0) {
      ++counter_even;
      pos_even = i;
    }
  }
  if (counter_even > counter_odd) {
    cout << pos_odd << endl;
  } else {
    cout << pos_even << endl;
  }
  return 0;
}
