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