#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, t = 0, d = 0, ans1, ans2;
  cin >> n;
  int arr[n];
  for (i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] % 2 == 0) {
      t++;
      ans1 = i + 1;
    } else if (arr[i] % 2 == 1) {
      d++;
      ans2 = i + 1;
    }
  }
  if (t == 1) {
    cout << ans1;
  } else if (d == 1) {
    cout << ans2;
  }
  return 0;
}
