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