#include <bits/stdc++.h>
using namespace std;
int main() {
  int nums[100];
  int evens = 0, odds = 0;
  int cases;
  cin >> cases;
  for (int i = 0; i < cases; i++) {
    cin >> nums[i];
    if (nums[i] % 2 == 0)
      evens++;
    else if (nums[i] % 2 == 1)
      odds++;
  }
  for (int i = 0; i < cases; i++) {
    if ((evens == 1 && nums[i] % 2 == 0) || (odds == 1 && nums[i] % 2 == 1)) {
      cout << i + 1 << endl;
      break;
    }
  }
}
