#include <bits/stdc++.h>
int main() {
  int n, x, y = 0, z = 0, b, c;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    if (x % 2 == 0) {
      y = y + 1;
      b = i + 1;
    } else {
      z = z + 1;
      c = i + 1;
    }
  }
  if (y > z)
    printf("%d", c);
  else
    printf("%d", b);
  return 0;
}
