#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long int LINF = 0x3f3f3f3f3f3f3f3fll;
const int MOD = 1e9 + 7;
const long double pi = acos(-1);
int n;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  vector<int> arr(n);
  for (auto& it : arr) cin >> it;
  int first_even = 0, first_odd = 0;
  int even_cnt = 0, odd_cnt = 0;
  for (int i = 0; i < n; i++) {
    if (arr[i] % 2) {
      odd_cnt++;
      if (!first_odd) first_odd = i + 1;
    } else {
      even_cnt++;
      if (!first_even) first_even = i + 1;
    }
  }
  if (even_cnt > odd_cnt)
    cout << first_odd << '\n';
  else
    cout << first_even << '\n';
  return 0;
}
