- Time limit: 1.00 s
- Memory limit: 512 MB
Your task is to count the number of ways to construct sum by throwing a dice one or more times. Each throw produces an outcome between and .
For example, if , there are ways:
Input
The only input line has an integer .
Output
Print the number of ways modulo .
Constraints
Example
Input:
3
Output:
4