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