Div

AtCoder
IDabc198_a
Time2000ms
Memory256MB
Difficulty
Two boys, A and B, will share $N$ indistinguishable sweets. How many ways are there to do this so that each boy gets a positive integer number of sweets? ## Constraints * $N$ is an integer. * $1 \leq N \leq 15$ ## Input Input is given from Standard Input in the following format: $N$ [samples]
Samples
Input #1
2
Output #1
1

There is only one way to share the sweets: A and B get one sweet each.
Input #2
1
Output #2
0
Input #3
3
Output #3
2
API Response (JSON)
{
  "problem": {
    "name": "Div",
    "description": {
      "content": "Two boys, A and B, will share $N$ indistinguishable sweets. How many ways are there to do this so that each boy gets a positive integer number of sweets?",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc198_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Two boys, A and B, will share $N$ indistinguishable sweets. How many ways are there to do this so that each boy gets a positive integer number of sweets?\n\n## Constraints\n\n*   $N$ is an integer.\n*   $1...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments