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