#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, arr[101];
  bool arr2[101], b1, b2, b3;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
    arr2[i] = arr[i] % 2;
  }
  for (int i = 1; i <= n; i++) {
    b1 = ((i == 1) && (arr2[1] != arr2[2]) && (arr2[1] != arr2[3]) &&
          (arr2[2] == arr2[3]));
    b2 = ((i > 1) && (i < n) && (arr2[i] != arr2[i - 1]) &&
          (arr2[i] != arr2[i + 1]) && (arr2[i - 1] == arr2[i + 1]));
    b3 = (i == n);
    if (b1 || b2 || b3) {
      printf("%d", i);
      break;
    }
  }
  return 0;
}
