#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int mod=1e9+7;
const int mxN=2001;
ll dp[mxN+1];
int main(){
	ll n,x=0;
	dp[0]=1;
	cin>>n;
	for(int i=1;i<=n;i++){
		if(i>=3){
			x=(x+dp[i-3])%mod;
		}
		dp[i]=x;
	}
	cout<<dp[n];
}