Skip to content
AlgoArena

Hogwarts Exam Ranking

Easy 1 s 256 MBbinary search

Harry Potter and his classmates just finished their exams at Hogwarts. The scores of all NN students are published on the wall in strictly increasing order (no duplicate marks).

Harry knows his exact score XX, and his score is guaranteed to be somewhere in the list. He wants to find his exact 1-based position (rank) on the list so he knows where he stands among his peers.

Given NN and Harry's score XX on the first line, and the strictly increasing list of student scores on the second line, help him find his position using binary search.

Input

The first line contains two integers NN and XX (1≤N≤2×1051 \le N \le 2 \times 10^5, 0≤X≤1090 \le X \le 10^9) — the number of students and Harry's score.

The second line contains NN space-separated integers a1,a2,…,aNa_1, a_2, \dots, a_N (0≤ai≤1090 \le a_i \le 10^9) — the student scores in strictly increasing order. It is guaranteed that XX exists in the list.

Output

Print a single integer — the 1-based position (rank) of Harry's score in the list.

Examples

Input 1
5 40
10 20 40 50 60
Output 1
3
Input 2
4 10
10 20 30 40
Output 2
1