You are given an array of non-negative integers from to .
You are allowed to perform the following operation:
choose one element and delete it from the array.
You need to find the minimum number of operations after which the smallest missing non-negative integer will be no greater than .
The first line contains two integers and (1 \le n \le 10^3, 0 \le k \le 10) — the number of elements in the array and the given number.
The second line contains integers a_1, a_2, \ldots, a_n (0 \le a_i \le 9) — the elements of the array.
Print one integer — the minimum number of elements that need to be deleted.
Example 1
Example 2
Example 3
In the first example, it is necessary to make the smallest missing element of the array no greater than .
The best choice is to delete all occurrences of the number . This requires operations.
After that, the number will be missing from the array, so the smallest missing element of the array will be equal to .
In the second example, the number is already missing from the array. Since 0 \le 5, no operations are needed.
In the third example, all elements of the array are no greater than , so the number is definitely missing from the array. Since 10 \le 10, no operations are needed.
( points): k=10;
( points): k=0;
( points): all values a_i are pairwise distinct;
( points): no additional constraints.