You have found the golden cornucopia, lucky you. This magic device multiplies coins according to its own magical rule. The magical rule is simple, when you insert p coins in the cornucopia, it returns the initial p coins plus the coins produced by entering p-1,p-2,...,p-7 coins in the cornucopia.
Since the number of coins returned by the cornucopia is extremely large, the goal is to write a program to return that number modulo 1000000007.
