Link to this code: https://cses.fi/paste/443e59057f092dcfde193d/
#include <bits/stdc++.h>

using namespace std;

#define in(a)                                                                  \
  for (auto &x : a)                                                            \
    cin >> x;
#define out(a)                                                                 \
  for (auto x : a)                                                             \
    cout << x << " ";
#define pb push_back
#define ll long long
typedef vector<ll> vi;
typedef pair<ll, ll> pii;

int mod = 1e9 + 7;
void solve() {
  int n;
  cin >> n;
  vector<ll> dp(n + 1, 0);
  dp[0] = 1;
  for (int i = 0; i <= n; i++) {
    for (int dice = 1; dice <= 6; dice++) {
      if (i + dice > n)
        break;
      dp[i + dice] = (dp[i + dice] + dp[i]) % mod;
    }
  }
  // for (int i = 1; i <= n; i++) {
  //   cout << dp[i] << ' ';
  // }
  // cout << '\n';
  cout << dp[n] << '\n';
}

int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);

  int t = 1;
  // cin >> t;

  while (t--) {
    solve();
  }

  return 0;
}