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