#include<cstdio>
#include<algorithm>
#define SF scanf
#define PF printf
#define MAXN 2010
#define MOD 1000000007
using namespace std;
typedef long long ll;
int n;
ll dp[MAXN],ans;
int main(){
	SF("%d",&n);
	dp[0]=1;
	for(int i=1;i<=n;i++)
		for(int j=3;j<=i;j++){
			dp[i]=(dp[i]+dp[i-j])%MOD;	
		}
	PF("%lld",dp[n]);
}