#include <bits/stdc++.h>
using namespace std;
const int maxn = 2001;
const int XRZ = 1000000007;
int dp[maxn], s, sum;
int main() {
	dp[0] = 1;
	for(int i = 3; i <= 2000; ++ i) {
		sum = (sum + dp[i - 3]) % XRZ;
		dp[i] = (dp[i] + sum) % XRZ;
	}
	cin >> s;
	cout << dp[s];
	return 0;
}