#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, arr[100000], j = 0, i = 0, a, b;
  cin >> n;
  for (int x = 0; x < n; cin >> arr[x++])
    ;
  for (int x = 0; x < n; x++) {
    if (arr[x] % 2 == 0)
      i++, a = x;
    else
      j++, b = x;
  }
  if (i > j)
    cout << b + 1;
  else
    cout << a + 1;
  return 0;
}
