#include<bits/stdc++.h>
#define mod 1000000007
using namespace std;
int dp[2001],s,sum;
int main()
{
	dp[0]=1;
	for(int i=3;i<=2000;i++)dp[i]=(dp[i]+(sum=(sum+dp[i-3])%mod))%mod;
	scanf("%d",&s);
	printf("%d",dp[s]);
	return 0;
}