is easy to calculate if n is smaller than 1000. But when n comes to 109,it may be hard to calculate the answer unless you can really computing!think you have this ability, so just do it!But the answer may be to large to calculate, so you can only calculate
You have a recursive formula such as It is easy to calculate if n is smaller than 1000. But when n comes to 109, it may be hard to calculate the answer unless you can really computing! I think you have this ability, so just do it! But the answer may be to large to calculate, so you can only calculate the answer mod 1e9+7.

(图片来源网络,侵删)