#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x[110];
  for (int i = 0; i < n; i++) {
    cin >> x[i];
  }
  int z = 0, f = 0, g, h;
  for (int i = 0; i < n; i++) {
    if (x[i] % 2 == 0)
      z++, h = i + 1;
    else
      f++, g = i + 1;
  }
  if (f == 1) cout << g;
  if (z == 1) cout << h;
  return 0;
}
