#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int ar[n];
  int c1 = 0, c2 = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ar[i]);
    if (ar[i] % 2 == 0)
      c1++;
    else
      c2++;
  }
  for (int i = 1; i <= n; i++) {
    if (c1 == 1) {
      if (ar[i] % 2 == 0) printf("%d", i);
    } else if (c2 == 1) {
      if (ar[i] % 2 != 0) printf("%d", i);
    }
  }
  return 0;
}
