{"raw_statement":[{"iden":"problem statement","content":"Snuke has a permutation $(P_0,P_1,\\cdots,P_{N-1})$ of $(0,1,\\cdots,N-1)$.\nNow, he will perform the following operation **exactly once**:\n\n*   Choose $K$ consecutive elements in $P$ and sort them in ascending order.\n\nFind the number of permutations that can be produced as $P$ after the operation."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 200000$\n*   $2 \\leq K \\leq N$\n*   $0 \\leq P_i \\leq N-1$\n*   $P_0,P_1,\\cdots,P_{N-1}$ are all different.\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $K$\n$P_0$ $P_1$ $\\cdots$ $P_{N-1}$"},{"iden":"sample input 1","content":"5 3\n0 2 1 4 3"},{"iden":"sample output 1","content":"2\n\nTwo permutations can be produced as $P$ after the operation: $(0,1,2,4,3)$ and $(0,2,1,3,4)$."},{"iden":"sample input 2","content":"4 4\n0 1 2 3"},{"iden":"sample output 2","content":"1"},{"iden":"sample input 3","content":"10 4\n2 0 1 3 7 5 4 6 8 9"},{"iden":"sample output 3","content":"6"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}