#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, arr[100], s = 0, e = 0, o = 0, ss, ee, oo, d;
  cin >> x;
  for (int i = 1; i <= x; i++) {
    cin >> arr[i];
  }
  for (int i = 1; i <= x; i++) {
    if (arr[i] % 2 == 0) e++;
  }
  if (e == (x - 1)) {
    for (int i = 1; i <= x; i++) {
      if (arr[i] % 2 != 0) oo = i;
    }
    cout << oo << endl;
    cin >> x;
    return 0;
  } else if (e == x) {
    for (int i = 1; i < x; i++) {
      if (arr[i] != arr[i + 1] && i != x - 1)
        oo = i;
      else if (arr[i] != arr[i + 1] && i == x - 1)
        oo = i + 1;
    }
    cout << oo << endl;
    cin >> x;
    return 0;
  }
  for (int i = 1; i <= x; i++) {
    if (arr[i] % 2 != 0) o++;
  }
  if (o == (x - 1)) {
    for (int i = 1; i <= x; i++) {
      if (arr[i] % 2 == 0) ee = i;
    }
    cout << ee << endl;
    cin >> x;
    return 0;
  } else if (o == x) {
    for (int i = 1; i < x; i++) {
      if (arr[i] != arr[i + 1] && i != x - 1)
        ee = i;
      else if (arr[i] != arr[i + 1] && i == x - 1)
        ee = i + 1;
    }
    cout << ee << endl;
    cin >> x;
    return 0;
  }
  cin >> x;
  return 0;
}
