Remoteland |
As the years in Remoteland have 1, 000, 000, 007 days, their citizens just need D modulo 1, 000, 000, 007. Note that they are interested in the largest D, not in the largest D modulo 1, 000, 000, 007.
Every test case is described by a single line with an integer n, ( 1n10, 000, 000). The input ends with a line containing 0.
For each test case, output the number of days ago the Republic became independent, modulo 1, 000, 000, 007, one per line.
4 9348095 6297540 0
4 177582252 644064736