Minimum Deletion#530

Minimum Deletion

0.3 seconds
256 megabytes
Easy

You are given an array of non-negative integers from to .

You are allowed to perform the following operation:

You need to find the minimum number of operations after which the smallest missing non-negative integer will be no greater than .

Input

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.

Output

Print one integer — the minimum number of elements that need to be deleted.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading

Note

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.

Scoring

  1. ( points): k=10;

  2. ( points): k=0;

  3. ( points): all values a_i are pairwise distinct;

  4. ( points): no additional constraints.