Given is a sequence of $N$ positive integers $A = (A_1, A_2, \ldots, A_N)$, where each $A_i$ is $1$, $2$, $\ldots$, or $K$.
You can do the following operation on this sequence any number of times.
* Swap two adjacent elements, that is, choose $i$ and $j$ such that $|i-j|=1$ and swap $A_i$ and $A_j$.
Find the minimum number of operations needed to make $A$ satisfy the following condition.
* $A$ contains $(1, 2, \ldots, K)$ as a contiguous subsequence, that is, there is a positive integer $n$ at most $N-K+1$ such that $A_n = 1$, $A_{n+1} = 2$, $\ldots$, and $A_{n+K-1} = K$.
## Constraints
* $2\leq K\leq 16$
* $K \leq N\leq 200$
* $A_i$ is $1$, $2$, $\ldots$, or $K$.
* $A$ contains at least one occurrence of each of $1, 2, \ldots, K$.
## Input
Input is given from Standard Input in the following format:
$N$ $K$
$A_1$ $A_2$ $\ldots$ $A_N$
[samples]