#include <bits/stdc++.h>
using namespace std;
int main() {
  int num, ev = 0, od = 0;
  cin >> num;
  int arr[num], eve[100] = {0}, odd[100] = {0};
  for (int i = 0; i < num; i++) cin >> arr[i];
  for (int i = 0; i < num; i++) {
    if (arr[i] % 2 == 0) {
      eve[ev] = i + 1;
      ev++;
    } else {
      odd[od] = i + 1;
      od++;
    }
  }
  if (odd[1] < eve[1])
    cout << odd[0];
  else
    cout << eve[0];
  return 0;
}
