Determine the lexicographic position of the given arrangement.
The first line contains two integers and (1 \leq K \leq N \leq 12). The second line contains distinct integers from to – the arrangement.
Print a single integer: the lexicographic position number of the given arrangement.
Example 1