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