#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, i = 1, p;
  int arr[101];
  cin >> a;
  p = a;
  while (a--) {
    cin >> arr[i];
    i++;
  }
  if ((arr[1]) % 2 == 0 && (arr[2]) % 2 == 0) {
    for (int j = 3; j <= p; j++) {
      if ((arr[j]) % 2 == 1) {
        cout << j;
      }
    }
  } else if ((arr[1] % 2) == 1 && (arr[2] % 2) == 1) {
    for (int j = 3; j <= p; j++) {
      if (arr[j] % 2 == 0) {
        cout << j;
      }
    }
  } else {
    if (arr[1] % 2 == 1 && arr[2] % 2 == 0) {
      if (arr[3] % 2 == 0) {
        cout << 1;
      } else {
        cout << 2;
      }
    } else {
      if (arr[3] % 2 == 0) {
        cout << 2;
      } else {
        cout << 1;
      }
    }
  }
}
