#include <bits/stdc++.h>
using namespace std;
long long n, bag[1000];
int main() {
  cin >> n;
  for (long long(i) = (0); (i) < (n); (i)++) cin >> bag[i];
  long long odd = -1, even = -1;
  for (long long(i) = (0); (i) < (n); (i)++) {
    if (bag[i] % 2 == 0) {
      if (odd != -1 && even != -1) {
        cout << even + 1;
        return 0;
      }
      odd = i;
    } else {
      if (odd != -1 && even != -1) {
        cout << odd + 1;
        return 0;
      }
      even = i;
    }
  }
  if (odd > even) {
    cout << odd + 1;
  } else {
    cout << even + 1;
  }
  return 0;
}
