SP4478 EXPR4 - Counting Expressions II

Description

Count the number of distinct expressions involving _n_ different operands **a**, **b**, **c**, etc. Only operators +, -, \*, / and parentheses are permitted. Single minus operator (for ex. -a\*b) is not allowed. Two expression are distinct if for some valid input values (i.e. You won't divide some number by zero) **a**, **b**, **c**, ... , the two expressions leads to different results. For example, a/b/c and a/(b\*c) are the same expressions, but a/b+c and a/(b+c) are not.

Input Format

Multiply test cases. For each test case: A single line - _n_.(1

Output Format

For each test case: The number of different expressions, modulo 1000000007.