#CCBCHBAHAI0000155. Tìm vị trí xuất hiện đầu tiên của x (First Position of x)

Tìm vị trí xuất hiện đầu tiên của x (First Position of x)

First Position of x

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given an integer array A=(a0,a1,…,an−1)A=(a_0,a_1,\ldots,a_{n-1}) and an integer xx, find the smallest 00-based index pp such that ap=xa_p=x.

If no such index exists, print -1.

Input

  • The first line contains integers nn and xx.
  • The second line contains nn integers a0,a1,…,an−1a_0,a_1,\ldots,a_{n-1}.

Output

Print the first index of xx, or -1 if xx does not occur.

Subtasks

Subtask 1 (100 points): 1≤n≤1051\le n\le10^5; −109≤ai,x≤109-10^9\le a_i,x\le10^9.

Examples

Input

7 5
2 5 3 5 8 5 1

Output

1

Explanation

Value 55 occurs at indices 1,3,51,3,5. The smallest is 11.