#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b[110], i, j, cn = 0, cn1 = 0, k = 0, l = 0;
  cin >> a;
  for (i = 1; i <= a; i++) {
    cin >> b[i];
    if (b[i] % 2 == 0) {
      cn++;
      k = i;
    } else {
      cn1++;
      l = i;
    }
  }
  if (cn == 1) cout << k << endl;
  if (cn1 == 1) cout << l << endl;
}
