#D2271. The Smallest Window II

    ID: 1887 Type: Default 1000ms 268MiB

The Smallest Window II

The Smallest Window II

For a given array a1,a2,a3,...,aNa_1, a_2, a_3, ... , a_N of NN elements and an integer KK, find the smallest sub-array size (smallest window length) where the elements in the sub-array contains all integers in range [1,2,...,K1, 2, ..., K]. If there is no such sub-array, report 0.

Constraints

  • 1N1051 \leq N \leq 10^5
  • 1K1051 \leq K \leq 10^5
  • 1ai1051 \leq a_i \leq 10^5

Input

The input is given in the following format.

NN KK a1a_1 a2a_2 ... aNa_N

Output

Print the smallest sub-array size in a line.

Examples

Input

6 2 4 1 2 1 3 5

Output

2

Input

6 3 4 1 2 1 3 5

Output

3

Input

3 4 1 2 3

Output

0

inputFormat

Input

The input is given in the following format.

NN KK a1a_1 a2a_2 ... aNa_N

outputFormat

Output

Print the smallest sub-array size in a line.

Examples

Input

6 2 4 1 2 1 3 5

Output

2

Input

6 3 4 1 2 1 3 5

Output

3

Input

3 4 1 2 3

Output

0

样例

3 4
1 2 3
0