First Occurrence
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