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