#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int divasers[1000], n, m, nums[1000];
  int output;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> nums[i];
  }
  int odd = 0;
  int even = 0;
  int lastodd = 0;
  int lasteven = 0;
  for (int i = 0; i < n; i++) {
    if (nums[i] % 2 == 0) {
      even++;
      lasteven = i;
    } else {
      odd++;
      lastodd = i;
    }
  }
  if (odd < even) {
    cout << lastodd + 1;
  } else {
    cout << lasteven + 1;
  }
}
