#include using namespace std; const long long MOD = 1000000007; int main(){ int N; cin >> N; vector> dp(N + 1, vector(N + 1, 0)); dp[0][0] = 1; for (int i = 0; i < N; i++){ for (int j = 0; j <= N; j++){ dp[i + 1][j] = dp[i][j]; if (j >= i && i >= 3){ dp[i + 1][j] += dp[i + 1][j - i]; dp[i + 1][j] %= MOD; } } } cout << (dp[N][N] + 1) % MOD << endl; }