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