import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.Scanner;
public class Ideone
{
{
int n;
int ans = 0;
Scanner myObj
= new Scanner
(System.
in); n = myObj.nextInt(); //считываем сумму, для которой будем считать количество перестановок
int a[] = new int[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];
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwuU2Nhbm5lcjsKcHVibGljIGNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlpbnQgbjsKCSAgICBpbnQgYW5zID0gMDsKCSAgICBTY2FubmVyIG15T2JqID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCSAgICBuID0gbXlPYmoubmV4dEludCgpOyAvL9GB0YfQuNGC0YvQstCw0LXQvCDRgdGD0LzQvNGDLCDQtNC70Y8g0LrQvtGC0L7RgNC+0Lkg0LHRg9C00LXQvCDRgdGH0LjRgtCw0YLRjCDQutC+0LvQuNGH0LXRgdGC0LLQviDQv9C10YDQtdGB0YLQsNC90L7QstC+0LoKCSAgICBpbnQgYVtdID0gbmV3IGludFtuKzFdOyAvL9GB0L7Qt9C00LDQtdC8INC80LDRgdGB0LjQsgoJICAgIEFycmF5cy5maWxsKGEsIDApOwoJICAgIGlmIChuID09IDEpIGFucyA9IDE7C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