{"problem":{"name":"Hammer","description":{"content":"Takahashi is at the origin of a number line. He wants to reach a goal at coordinate $X$. There is a wall at coordinate $Y$, which Takahashi cannot go beyond at first.   However, after picking up a ham","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc270_b"},"statements":[{"statement_type":"Markdown","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.\n\n## Constraints\n\n*   $-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.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$X$ $Y$ $Z$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc270_b","tags":[],"sample_group":[["10 -10 1","10\n\nTakahashi can go straight to the goal."],["20 10 -10","40\n\nThe goal is beyond the wall. He can get there by first picking up the hammer and then destroying the wall."],["100 1 1000","\\-1"]],"created_at":"2026-03-03 11:01:13"}}