#include <iostream>
using namespace std;
int main() {
int n;
int ans;
cin >> n; //считываем сумму, для которой будем считать количество перестановок
long long a[n+1]; //создаем массив
if (n == 1) ans = 1;
if (n == 2) ans = 2;
if (n == 3) ans = 4;
if (n == 4) ans = 8;
if (n == 5) ans = 16;
if (n == 6) ans = 32;
// частные случаи
if (n > 6)
{
a[1] = 1;
a[2] = 2;
a[3] = 4;
a[4] = 8;
a[5] = 16;
a[6] = 32;
for (int i = 7; i < n + 1; i++)
{
a[i]=0;
for (int j = 1; j < 7; j++) // вычисление количества для i-ой суммы
a[i] = ( a[i] + a[i-j] ) % 1000000007;
}
ans = a[n];
}
cout << ans;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbjsKCWludCBhbnM7CgljaW4gPj4gbjsgLy/RgdGH0LjRgtGL0LLQsNC10Lwg0YHRg9C80LzRgywg0LTQu9GPINC60L7RgtC+0YDQvtC5INCx0YPQtNC10Lwg0YHRh9C40YLQsNGC0Ywg0LrQvtC70LjRh9C10YHRgtCy0L4g0L/QtdGA0LXRgdGC0LDQvdC+0LLQvtC6Cglsb25nIGxvbmcgYVtuKzFdOyAvL9GB0L7Qt9C00LDQtdC8INC80LDRgdGB0LjQsgoJaWYgKG4gPT0gMSkgYW5zID0gMTsKCWlmIChuID09IDIpIGFucyA9IDI7CglpZiAobiA9PSAzKSBhbnMgPSA0OwoJaWYgKG4gPT0gNCkgYW5zID0gODsKCWlmIChuID09IDUpIGFucyA9IDE2OwoJaWYgKG4gPT0gNikgYW5zID0gMzI7CgkvLyDRh9Cw0YHRgtC90YvQtSDRgdC70YPRh9Cw0LgKCQoJaWYgKG4gPiA2KQoJewoJCWFbMV0gPSAxOyAKCQlhWzJdID0gMjsgCgkJYVszXSA9IDQ7IAoJCWFbNF0gPSA4OwoJCWFbNV0gPSAxNjsgCgkJYVs2XSA9IDMyOyAKCQlmb3IgKGludCBpID0gN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