#include <bits/stdc++.h>
using namespace std;
bool Compare(const pair<int, int> &a, const pair<int, int> &b) {
  return a.first > b.first;
}
string tostring(long long int Number) {
  string String;
  ostringstream Convert;
  Convert << Number;
  String = Convert.str();
  return String;
}
long long int toint(string String) {
  stringstream Convert(String);
  long long int Number = 0;
  Convert >> Number;
  return Number;
}
int main() {
  int N;
  while (cin >> N) {
    map<int, int> Map;
    long long int A[N + 1];
    int E = 0, O = 0;
    for (int I = 1; I <= N; I += 1) {
      cin >> A[I];
      if (A[I] % 2 == 0)
        E += 1;
      else
        O += 1;
      Map[A[I]]++;
    }
    int Mx = max(E, O);
    if (E == Mx) {
      for (int I = 1; I <= N; I += 1) {
        if (A[I] % 2 == 1) {
          cout << I << endl;
          break;
        }
      }
    } else {
      for (int I = 1; I <= N; I += 1) {
        if (A[I] % 2 == 0) {
          cout << I << endl;
          break;
        }
      }
    }
  }
  return 0;
}
