{"problem":{"name":"-- - B","description":{"content":"Snuke has come to Seisu-ya (_integer shop_) with an integer $B$ in his hand. In Seiyu-ya, you can exchange your integer for another integer by paying money. More specifically, you can use the followin","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc112_b"},"statements":[{"statement_type":"Markdown","content":"Snuke has come to Seisu-ya (_integer shop_) with an integer $B$ in his hand. In Seiyu-ya, you can exchange your integer for another integer by paying money.\nMore specifically, you can use the following two services any number of times in any order:\n\n*   Pay $1$ yen (the currency of Japan) to multiply your integer by $-1$.\n*   Pay $2$ yen to subtract $1$ from your integer.\n\nHow many integers are there that Snuke can get for at most $C$ yen?\n\n## Constraints\n\n*   $-10^{18}\\le B \\le 10^{18}$\n*   $1\\le C \\le 10^{18}$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$B$ $C$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc112_b","tags":[],"sample_group":[["11 2","3\n\nThere are three numbers that Snuke can get: $-11$, $10$, and $11$, as follows:\n\n*   by doing nothing, he can get $11$ for $0$ yen;\n*   by multiplying $11$ by $-1$, he can get $-11$ for $1$ yen;\n*   by subtracting $1$ from $11$, he can get $10$ for $2$ yen."],["0 4","4\n\nThere are four numbers that Snuke can get: $-2$, $-1$, $0$, and $1$, as follows:\n\n*   by doing nothing, he can get $0$ for $0$ yen;\n*   by subtracting $1$ from $0$, he can get $-1$ for $2$ yen;\n*   by subtracting $1$ from $0$ and then multiplying by $-1$, he can get $1$ for $3$ yen;\n*   by subtracting $1$ from $0$ and then subtracting $1$ again, he can get $-2$ for $4$ yen."],["112 20210213","20210436"],["\\-211 1000000000000000000","1000000000000000422"]],"created_at":"2026-03-03 11:01:14"}}