#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count = 0, pount = 0, pos = 0, tos = 0;
  int a[100];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int j = 0; j < n; j++) {
    if ((a[j] + 2) % 2 == 0) {
      count++;
      pos = j;
    } else {
      pount++;
      tos = j;
    }
  }
  if (pount < count) {
    cout << tos + 1;
  } else {
    cout << pos + 1;
  }
  return 0;
}
