In this problem, we say that a partition of the numbers is nice if
it has at least two subsets,
and every subset has at least two elements.
Additionally, we only consider partitions that are qualitatively different.
For instance, for we only have one nice partition: . Notice that would not fulfil the first property above, would not fulfil the second property above, while would be basically the same partition as the only one given.
Given , how many nice partitions do we have?
Input consists of several cases, each one with an between 1 and .
For every , print the number of nice partitions of modulo .
Input
3 5 6 10 114 30000
Output
0 1 3 11 674029 55250428