#CCBCHBAHAI0000165. Kiểm tra IQ (IQ test)

    ID: 1083 Loại: Thông thường 2000ms 256MiB Tried: 0 Đã chấp nhận: 0 Độ khó: 1 Đăng bởi: Nhãn>Programming language basicsStatic arraysIteration techniquesImplementation techniquesInteger arithmetic

Kiểm tra IQ (IQ test)

IQ test

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem

Among nn positive integers, exactly one differs from all the others in parity: either one is odd and all others are even, or one is even and all others are odd.

Print the 1-based position of that element.

Input

  • Line 1: integer nn.
  • Line 2: nn integers.

Output

Print the 1-based position of the parity outlier.

Subtask

Subtask 1 (100 points): 3≤n≤1003\le n\le100; 1≤ai≤1001\le a_i\le100; exactly one element differs in parity.

Example

Input

5
2 4 7 8 10

Output

3

Explanation

Only 77 is odd, and it is at position 33.