7003 - 二分查找-1

有一个数为n的升序非重序列,用二分查找方法,判断x是否在这n个数中。

Input

第一行,一个正整数n, n < 10^5
第二行,n个整数,中间用空格隔开,每个整数都在int范围内
第三行,一个整数x

Output

输出整数的位置,如果找不到,则输出-1

Examples

Input

5
1 2 3 4 5
2

Output

2
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题