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