#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int M = 1000000007;
ll arr[1000001];
int main() {
arr[0]=1;
int n; cin >> n;
for(int i=0; i<n; i++)
for(int j=1; j<=6; j++)
if(i+j<=n) arr[i+j] = (arr[i+j] + arr[i])%M;
cout<<arr[n]<<endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnVzaW5nIGxsID0gbG9uZyBsb25nOwogCmNvbnN0IGludCBNID0gMTAwMDAwMDAwNzsKbGwgYXJyWzEwMDAwMDFdOwogCmludCBtYWluKCkgewogCmFyclswXT0xOwogCmludCBuOyBjaW4gPj4gbjsKIApmb3IoaW50IGk9MDsgaTxuOyBpKyspCiAgICAKICAgZm9yKGludCBqPTE7IGo8PTY7IGorKykKICAgIAogICAgICBpZihpK2o8PW4pIGFycltpK2pdID0gKGFycltpK2pdICsgYXJyW2ldKSVNOwogCmNvdXQ8PGFycltuXTw8ZW5kbDsKIApyZXR1cm4gMDsKfQ==