{"raw_statement":[{"iden":"problem statement","content":"For an integer $N$, we will choose a permutation ${P_1, P_2, ..., P_N}$ of ${1, 2, ..., N}$.\nThen, for each $i=1,2,...,N$, let $M_i$ be the remainder when $i$ is divided by $P_i$.\nFind the maximum possible value of $M_1 + M_2 + \\cdots + M_N$."},{"iden":"constraints","content":"*   $N$ is an integer satisfying $1 \\leq N \\leq 10^9$."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$"},{"iden":"sample input 1","content":"2"},{"iden":"sample output 1","content":"1\n\nWhen the permutation ${P_1, P_2} = {2, 1}$ is chosen, $M_1 + M_2 = 1 + 0 = 1$."},{"iden":"sample input 2","content":"13"},{"iden":"sample output 2","content":"78"},{"iden":"sample input 3","content":"1"},{"iden":"sample output 3","content":"0"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}