#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, even = 0, odd = 0, i;
  cin >> m;
  int arr[m];
  for (int i = 0; i <= m - 1; i++) {
    cin >> arr[i];
    if (arr[i] % 2 == 0) {
      even++;
    } else {
      odd++;
    }
  }
  if (even > odd) {
    for (int i = 0; i <= m - 1; i++) {
      if (arr[i] % 2 != 0) {
        cout << i + 1;
      }
    }
  } else {
    for (int i = 0; i <= m - 1; i++) {
      if (arr[i] % 2 == 0) {
        cout << i + 1;
      }
    }
  }
  return 0;
}
