【问题描述】
从正整数 1∼n 中选出若干数满足以下条件:
- 如果 x 被选中,则 2x,3x 都不能被选中。
问有多少种不同的选数方法(什么都不选也算一种满足条件的选法)。
两种方法不同当且仅当至少存在一个数在一个方法中被选中而在另一个方法中没有被选中。
答案对 109+7 取模。
【输入格式】
从文件 select.in 中读入数据。
输入一行,包含一个正整数 n。
【输出格式】
输出到文件 select.out 中。
输出一行,包含一个整数,表示答案对 109+7 取模的结果。
【样例输入1】
4
【样例输出1】
8
【样例2】
见选手目录下的 select/select2.in 与 select/select2.ans。
【样例3】
见选手目录下的 select/select3.in 与 select/select3.ans。
【样例4】
见选手目录下的 select/select4.in 与 select/select4.ans。
【样例5】
见选手目录下的 select/select5.in 与 select/select5.ans。
【样例6】
见选手目录下的 select/select6.in 与 select/select6.ans。
【样例7】
见选手目录下的 select/select7.in 与 select/select7.ans。
【样例8】
见选手目录下的 select/select8.in 与 select/select8.ans。
【样例9】
见选手目录下的 select/select9.in 与 select/select9.ans。
【样例10】
见选手目录下的 select/select10.in 与 select/select10.ans。
【数据范围】
对于 10% 的数据,1≤n≤10;
对于 20% 的数据,1≤n≤102;
对于 30% 的数据,1≤n≤103;
对于 40% 的数据,1≤n≤104;
对于 50% 的数据,1≤n≤105;
对于 60% 的数据,1≤n≤106;
对于 70% 的数据,1≤n≤107;
对于 80% 的数据,1≤n≤108;
对于 90% 的数据,1≤n≤109;
对于 100% 的数据,1≤n≤1010。