#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int* a = (int*)malloc(sizeof(int) * n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 1; i < n; i++) {
    if ((a[i] - a[i - 1]) % 2 != 0 && (a[i] - a[i + 1]) % 2 != 0) {
      printf("%d", i + 1);
      exit(0);
    }
  }
  if ((a[0] - a[1]) % 2 != 0)
    printf("1");
  else
    printf("%d", n);
}
