#include <bits/stdc++.h>
using namespace std;
#define file(NAME) if (fopen(NAME".inp", "r")) freopen(NAME".inp", "r", stdin), freopen(NAME".out", "w", stdout)
#define FOR(i, a, b) for (int i = (int) a; i <= (int) b; ++i)
#define FOD(i, a, b) for (int i = (int) a; i >= (int) b; --i)
#define all(s) (s).begin(), (s).end()
#define pb push_back
#define ll long long
#define int ll
#define fi first
#define se second
#define pii pair<int, int>
const int maxn = 1e6 + 5;
const int N = 505;
const int MOD = 1e9 + 7;
int n;
int dp[maxn];
int calc(int val) {
if (val > n) return 0;
if (val == n) return 1;
int &ans = dp[val];
if (ans != 0) return ans;
for (int i = 1; i <= 6; ++i) {
ans = (ans + calc(val + i) % MOD) % MOD;
}
return ans;
}
signed main() {
cin.tie(0) -> sync_with_stdio(0);
file("x");
cin >> n;
cout << calc(0);
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKI2RlZmluZSBmaWxlKE5BTUUpIGlmIChmb3BlbihOQU1FIi5pbnAiLCAiciIpKSAgZnJlb3BlbihOQU1FIi5pbnAiLCAiciIsIHN0ZGluKSwgZnJlb3BlbihOQU1FIi5vdXQiLCAidyIsIHN0ZG91dCkKI2RlZmluZSBGT1IoaSwgYSwgYikgZm9yIChpbnQgaSA9IChpbnQpIGE7IGkgPD0gKGludCkgYjsgKytpKQojZGVmaW5lIEZPRChpLCBhLCBiKSBmb3IgKGludCBpID0gKGludCkgYTsgaSA+PSAoaW50KSBiOyAtLWkpCgojZGVmaW5lIGFsbChzKSAocykuYmVnaW4oKSwgKHMpLmVuZCgpCiNkZWZpbmUgcGIgcHVzaF9iYWNrCiNkZWZpbmUgbGwgbG9uZyBsb25nCiNkZWZpbmUgaW50IGxsCiNkZWZpbmUgZmkgZmlyc3QKI2RlZmluZSBzZSBzZWNvbmQKI2RlZmluZSBwaWkgcGFpcjxpbnQsIGludD4KCmNvbnN0IGludCBtYXhuID0gMWU2ICsgNTsK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