#include <bits/stdc++.h>
using namespace std;
int main() {
  int f = 0, m = 0, k, t, x, n;
  cin >> n;
  for (int a = 0; a < n; a++) {
    cin >> x;
    if (x % 2 == 0)
      k = a + 1, f++;
    else
      t = a + 1, m++;
  }
  if (f == 1)
    cout << k;
  else
    cout << t;
}
