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