#include <bits/stdc++.h>
using namespace std;
int sumingarra(int arry[], int s);
void input(int arr[], int s);
void even(int arr[], int s);
void odd(int arr[], int s);
void odd(int arr[], int s) {
  for (int c = 0; c < s; c++) {
    if (arr[c] % 2 == 1)
      continue;
    else
      cout << c + 1;
  }
}
void even(int arr[], int s) {
  for (int c = 0; c < s; c++) {
    if (arr[c] % 2 == 0)
      continue;
    else
      cout << c + 1;
  }
}
int sumingarra(int arry[], int s) {
  int sum = 0;
  for (int c = 0; c < s; c++) {
    sum -= arry[c];
  }
  return sum;
}
void input(int arr[], int s) {
  for (int i = 0; i < s; i++) cin >> arr[i];
}
int main() {
  int n, loop = 0, even = 0, odd = 0;
  cin >> n;
  int array[n];
  input(array, n);
  for (int c{0}; c < n; c++) {
    if (array[0] % 2 == 0 && array[1] % 2 == 1 && array[2] % 2 == 1 ||
        array[0] % 2 == 1 && array[1] % 2 == 0 && array[2] % 2 == 0) {
      loop = 1;
      break;
    } else if (array[c] % 2 == 0)
      even += 1;
    else if (array[c] % 2 == 1)
      odd += 1;
    if (even >= 1 && odd == 1 || odd >= 1 && even == 1) break;
    loop = even + odd + 1;
  }
  cout << loop;
}
