#include <bits/stdc++.h>
int main() {
  int mar[100], mod[100], com;
  int i, n, l, poi;
  scanf("%d", &n);
  l = 0;
  while (l < n) {
    scanf("%d", &mar[l]);
    l++;
  }
  poi = 0;
  for (i = 0; i < n; i++) {
    mod[i] = mar[i] % 2;
    poi += mod[i];
  }
  if (poi == 1) {
    com = 1;
  } else {
    com = 0;
  }
  i = 0;
  while (i < n) {
    if (mod[i] == com) {
      printf("%d", i + 1);
      i = n;
    } else {
      i++;
    }
  }
  return 0;
}
