A - Div
Editorial
/
Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 100 点
問題文
N 個の互いに区別できないお菓子を、A君とB君で分け合います。 両者とも 1 個以上の整数個のお菓子を得るような分け方は何通りありますか?
制約
- N は整数
- 1 \leq N \leq 15
入力
入力は以下の形式で標準入力から与えられる。
N
出力
答えを整数として出力せよ。
入力例 1
2
出力例 1
1
A君が 1 個、B君が 1 個取る方法のみ存在します。
入力例 2
1
出力例 2
0
入力例 3
3
出力例 3
2
Score : 100 points
Problem Statement
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
Output
Print the answer as an integer.
Sample Input 1
2
Sample Output 1
1
There is only one way to share the sweets: A and B get one sweet each.
Sample Input 2
1
Sample Output 2
0
Sample Input 3
3
Sample Output 3
2