#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, e = 0, o = 0;
  cin >> n;
  int arr[100];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] % 2 == 0)
      e++;
    else
      o++;
  }
  if (o == 1) {
    for (int i = 0; i < n; i++)
      if (arr[i] % 2 != 0) {
        cout << i + 1;
        break;
      }
  } else if (e == 1) {
    for (int i = 0; i < n; i++)
      if (arr[i] % 2 == 0) {
        cout << i + 1;
        break;
      }
  }
  return 0;
}
