#include <bits/stdc++.h>
using namespace std;
int main() {
  int numcnt;
  int lastEvenIdx, lastOddIdx;
  int arr[101] = {0};
  cin >> numcnt;
  int summation = 0;
  for (int i = 0; i < numcnt; ++i) {
    cin >> arr[i];
    arr[i] %= 2;
    if (arr[i] == 0) {
      lastEvenIdx = i;
    } else {
      lastOddIdx = i;
    }
    summation += arr[i];
  }
  if (summation == 1) {
    cout << lastOddIdx + 1 << endl;
  } else {
    cout << lastEvenIdx + 1 << endl;
  }
  return 0;
}
