#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, *arr = nullptr, inde, indo, ce = 0, co = 0;
  cin >> n;
  arr = new int[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] % 2) {
      co++;
      indo = i;
    } else {
      ce++;
      inde = i;
    }
  }
  if (co == 1)
    cout << indo + 1 << endl;
  else
    cout << inde + 1 << endl;
  delete[] arr;
  return 0;
}
