{"raw_statement":[{"iden":"problem statement","content":"Given is a sequence of three integers $A = (A_1, A_2, A_3)$. On this sequence, you can do the following operation any number of times:\n\n*   choose $i\\in {1,2,3}$ and add $1$ to $A_i$.\n\nFind the minimum number of operations needed to make $A$ arithmetic. Here, the sequence $A = (A_1, A_2, A_3)$ is arithmetic when $A_2 - A_1 = A_3 - A_2$ holds."},{"iden":"constraints","content":"*   $1\\leq A_1, A_2, A_3\\leq 10^{15}$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$A_1$ $A_2$ $A_3$"},{"iden":"sample input 1","content":"4 8 10"},{"iden":"sample output 1","content":"2\n\nOne operation with $i = 1$ and then one operation with $i = 3$ yield an arithmetic sequence $(5, 8, 11)$."},{"iden":"sample input 2","content":"10 3 4"},{"iden":"sample output 2","content":"4\n\nFour operations with $i = 2$ yield an arithmetic sequence $(10, 7, 4)$."},{"iden":"sample input 3","content":"1 2 3"},{"iden":"sample output 3","content":"0\n\nThe sequence $A$ is already arithmetic from the beginning, so we need zero operations."},{"iden":"sample input 4","content":"1000000000000000 1 1000000000000000"},{"iden":"sample output 4","content":"999999999999999"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}