{"problem":{"name":"Division or Subtraction","description":{"content":"Given is a positive integer $N$. We will choose an integer $K$ between $2$ and $N$ (inclusive), then we will repeat the operation below until $N$ becomes less than $K$. *   Operation: if $K$ divides ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc161_f"},"statements":[{"statement_type":"Markdown","content":"Given is a positive integer $N$.\nWe will choose an integer $K$ between $2$ and $N$ (inclusive), then we will repeat the operation below until $N$ becomes less than $K$.\n\n*   Operation: if $K$ divides $N$, replace $N$ with $N/K$; otherwise, replace $N$ with $N-K$.\n\nIn how many choices of $K$ will $N$ become $1$ in the end?\n\n## Constraints\n\n*   $2 \\leq N \\leq 10^{12}$\n*   $N$ is an integer.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc161_f","tags":[],"sample_group":[["6","3\n\nThere are three choices of $K$ in which $N$ becomes $1$ in the end: $2$, $5$, and $6$.\nIn each of these choices, $N$ will change as follows:\n\n*   When $K=2$: $6 \\to 3 \\to 1$\n*   When $K=5$: $6 \\to 1$\n*   When $K=6$: $6 \\to 1$"],["3141","13"],["314159265358","9"]],"created_at":"2026-03-03 11:01:14"}}