#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
int n, arr[109];
vector<int> odd, even;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); i++) {
    scanf("%d", &arr[i]);
    if (arr[i] % 2 == 0)
      even.push_back(i);
    else
      odd.push_back(i);
  }
  if (even.size() == n - 1)
    printf("%d\n", odd[0] + 1);
  else
    printf("%d\n", even[0] + 1);
}
