#include<bits/stdc++.h>
using namespace std;
int n, dp[1000005];
const int mod = 1e9 + 7;
int main() {
cin >> n;
/// if (n == 0) return 1
/// TH co so
dp[0] = 1;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= 6; j++)
if (i - j >= 0) {
dp[i] += dp[i - j];
dp[i] %= mod;
}
}
cout << dp[n];
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbiwgZHBbMTAwMDAwNV07Cgpjb25zdCBpbnQgbW9kID0gMWU5ICsgNzsKCmludCBtYWluKCkgewogICAgY2luID4+IG47CiAgICAvLy8gaWYgKG4gPT0gMCkgcmV0dXJuIDEKICAgIC8vLyBUSCBjbyBzbwogICAgZHBbMF0gPSAxOwogICAgZm9yIChpbnQgaSA9IDE7IGkgPD0gbjsgaSsrKSB7CiAgICAgICAgZm9yIChpbnQgaiA9IDE7IGogPD0gNjsgaisrKQogICAgICAgICAgICBpZiAoaSAtIGogPj0gMCkgewogICAgICAgICAgICAgICAgZHBbaV0gKz0gZHBbaSAtIGpdOwogICAgICAgICAgICAgICAgZHBbaV0gJT0gbW9kOwogICAgICAgICAgICB9CiAgICB9CgogICAgY291dCA8PCBkcFtuXTsKCn0K