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