#include <bits/stdc++.h>
int main() {
  int n, i, count = 0, count2 = 0;
  scanf("%d", &n);
  int a[150];
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  int j, k;
  for (i = 1; i <= n; i++) {
    if (a[i] % 2 == 0) {
      count++;
      j = i;
    } else {
      count2++;
      k = i;
    }
  }
  if (count == 1) {
    printf("%d\n", j);
  } else {
    printf("%d\n", k);
  }
  return 0;
}
