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