{"raw_statement":[{"iden":"problem statement","content":"Takahashi is at the origin of a number line. He wants to reach a goal at coordinate $X$.\nThere is a wall at coordinate $Y$, which Takahashi cannot go beyond at first.  \nHowever, after picking up a hammer at coordinate $Z$, he can destroy that wall and pass through.\nDetermine whether Takahashi can reach the goal. If he can, find the minimum total distance he needs to travel to do so."},{"iden":"constraints","content":"*   $-1000 \\leq X,Y,Z \\leq 1000$\n*   $X$, $Y$, and $Z$ are distinct, and none of them is $0$.\n*   All values in the input are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$X$ $Y$ $Z$"},{"iden":"sample input 1","content":"10 -10 1"},{"iden":"sample output 1","content":"10\n\nTakahashi can go straight to the goal."},{"iden":"sample input 2","content":"20 10 -10"},{"iden":"sample output 2","content":"40\n\nThe goal is beyond the wall. He can get there by first picking up the hammer and then destroying the wall."},{"iden":"sample input 3","content":"100 1 1000"},{"iden":"sample output 3","content":"\\-1"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}