#include <bits/stdc++.h>
int main() {
  int n, even = 0, odd = 0, ans1, ans2, i;
  scanf("%d", &n);
  int a[n];
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  for (i = 0; i < n; i++) {
    if (a[i] % 2 == 0) {
      even++;
      ans1 = i + 1;
    } else {
      odd++;
      ans2 = i + 1;
    }
  }
  if (even > odd)
    printf("%d", ans2);
  else
    printf("%d", ans1);
}
