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