#include <bits/stdc++.h>
using namespace std;
int arr[101][101];
bool valid(int m) {}
int main() {
  int n, x;
  cin >> n;
  vector<int> even, odd;
  for (int i = 1; i < n + 1; i++) {
    cin >> x;
    if (x % 2)
      odd.push_back(i);
    else
      even.push_back(i);
  }
  if (odd.size() == 1)
    cout << *odd.begin();
  else
    cout << *even.begin();
}
