Consider a sequence s_1, s_2, …, s_n of n infinite binary strings (that is, consisting only of zeros and ones), where each character of each string is generated uniformly at random independently from others. Denote f(s_1,s_2,…,s_n)=max_1≤i<j≤nLCP(s_i,s_j), where LCP is the maximum common prefix of two strings. Compute the expected value of f(s_1,s_2,…,s_n).
The only line of the input contains one integer n (2≤n≤104).
Let the answer in the form of an irreducible fraction be P/Q. Then output P⋅Q−1mod(109+7). It is guaranteed that Qmod(109+7)=0.
Note that the expected value is always finite, that is, Ef(s_1,…,s_n)<∞.
In the second sample the answer is 37.