#include <bits/stdc++.h>
using namespace std;
int n, m, even, odd, even_cnt, odd_cnt, odd_index, even_index;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> m;
    if (m % 2 == 0) {
      even_cnt++;
      even_index = i + 1;
    } else {
      odd_cnt++;
      odd_index = i + 1;
    }
  }
  if (even_cnt == 1) {
    cout << even_index;
  } else {
    cout << odd_index;
  }
}
