#include <bits/stdc++.h>
using namespace std;
int min(int a, int b) { return a < b ? a : b; }
int main() {
  vector<int> v;
  decltype(v.size()) n;
  int num;
  cin >> n;
  for (decltype(n) i = 0; i < n; i++) {
    cin >> num;
    v.push_back(num);
  }
  for (decltype(n) i = 0; i != n; i++)
    if (i == 0) {
      if (v[i] % 2 != v[i + 1] % 2 && v[i + 1] % 2 == v[i + 2] % 2)
        cout << i + 1 << endl;
    } else if (i == n - 1) {
      if (v[i] % 2 != v[i - 1] % 2 && v[i - 1] % 2 == v[i - 2] % 2)
        cout << i + 1 << endl;
    } else if (v[i] % 2 != v[i - 1] % 2 && v[i] % 2 != v[i + 1] % 2)
      cout << i + 1 << endl;
  return 0;
}
