题目描述
Problem Description
Finn loves the numbers 4 and 5, and he believes that any number can be formed by adding 4s and 5s.
For example:
- $14 = 5 + 5 + 4$
- $20 = 4 + 4 + 4 + 4 + 4$ or $20 = 5 + 5 + 5 + 5$
- $40 = 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4$ or $40 = 4 + 4 + 4 + 4 + 4 + 5 + 5 + 5 + 5$ or $40 = 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5$
The order of 4s and 5s does not matter, only their counts.
Given a positive integer $n$, determine how many ways $n$ can be formed using 4s and 5s.
Input Format
A single line containing an integer $n$, the number to be formed.
Output Format
A single line indicating the number of ways $n$ can be formed. If it is not possible to form $n$, output $0$.
Sample Input and Output
Sample Input #1
14
Sample Output #1
1
Sample Input #2
40
Sample Output #2
3
Sample Input #3
6
Sample Output #3
0
Notes
- For 20% of the data: $1 \le n \le 10$
- For another 15% of the data: $1 \le n \le 10^5$ and $n \equiv 0 \pmod{4}$
- For another 15% of the data: $1 \le n \le 10^5$ and $n \equiv 0 \pmod{5}$
- For 100% of the data: $1 \le n \le 10^6$
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
14
样例输出
1