/**
* 在一个国家仅有1分,2分,3分硬币,将钱N分兑换成硬币有很多种兑法。请你编程序计算出共有多少种兑法。
*
* 解答要求
* 时间限制:1000ms, 内存限制:100MB
* 输入
* 输入每行包含一个正整数N(0<N<32768)。输入到文件末尾结束。
*
* 输出
* 输出对应的兑换方法数。
*
* 样例
* 输入样例 1 复制
*
* 3
* 2934
* 输出样例 1
*
* 3
* 718831
* 提示样例 1
*/
import java.util.Scanner;
public class Main_1 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNextInt()) {
Integer N = in.nextInt();
System.out.println(extracted(N));
}
}
private static Integer extracted(Integer N) {
int a = N / 3 + 1;
for (int i = 0; i <= N/3; i++) {
int t;
t = (N - 3 * i) / 2;
a += t;
}
return a;
}
}