#include <bits/stdc++.h>
using namespace std;
using ll = unsigned long long;
ll mod = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int even = 0, odd = 0;
  for (int i = 0; i < 3; i++) {
    if (a[i] % 2 == 0) {
      even++;
    } else {
      odd++;
    }
  }
  if (even == 2) {
    for (int i = 0; i < 3; i++) {
      if (a[i] % 2 == 1) {
        cout << i + 1;
        return 0;
      }
    }
  } else if (even == 1) {
    for (int i = 0; i < 3; i++) {
      if (a[i] % 2 == 0) {
        cout << i + 1;
        return 0;
      }
    }
  } else if (even == 0) {
    for (int i = 3; i < n; i++) {
      if (a[i] % 2 == 0) {
        cout << i + 1;
        return 0;
      }
    }
  } else {
    for (int i = 3; i < n; i++) {
      if (a[i] % 2 == 1) {
        cout << i + 1;
        return 0;
      }
    }
  }
  return 0;
}
