First Occurrence


Submit solution

Points: 100
Time limit: 2.0s
Memory limit: 256M

Author:
Problem types

Find the first zero-based position of \(x\) in an array.

Input

The first line contains \(n\). The second line contains \(n\) integers. The third line contains \(x\).

The input satisfies:

  • \(1 <= n <= 10^5\)

Output

Print the smallest index \(i\) with \(A_i=x\), or -1 if no such index exists.

Example

Input
3
1 2 3
4
Output
-1

Comments

There are no comments at the moment.