{"raw_statement":[{"iden":"problem statement","content":"There are $N$ candles placed on a number line. The $i$\\-th candle from the left is placed on coordinate $x_i$. Here, $x_1 < x_2 < ... < x_N$ holds.\nInitially, no candles are burning. Snuke decides to light $K$ of the $N$ candles.\nNow, he is at coordinate $0$. He can move left and right along the line with speed $1$. He can also light a candle when he is at the same position as the candle, in negligible time.\nFind the minimum time required to light $K$ candles."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 10^5$\n*   $1 \\leq K \\leq N$\n*   $x_i$ is an integer.\n*   $|x_i| \\leq 10^8$\n*   $x_1 < x_2 < ... < x_N$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $K$\n$x_1$ $x_2$ $...$ $x_N$"},{"iden":"sample input 1","content":"5 3\n-30 -10 10 20 50"},{"iden":"sample output 1","content":"40\n\nHe should move and light candles as follows:\n\n*   Move from coordinate $0$ to $-10$.\n*   Light the second candle from the left.\n*   Move from coordinate $-10$ to $10$.\n*   Light the third candle from the left.\n*   Move from coordinate $10$ to $20$.\n*   Light the fourth candle from the left."},{"iden":"sample input 2","content":"3 2\n10 20 30"},{"iden":"sample output 2","content":"20"},{"iden":"sample input 3","content":"1 1\n0"},{"iden":"sample output 3","content":"0\n\n*   There may be a candle placed at coordinate $0$."},{"iden":"sample input 4","content":"8 5\n-9 -7 -4 -3 1 2 3 4"},{"iden":"sample output 4","content":"10"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}