#include <cstdio>
#define M 1000000007
using namespace std;
int f[11111];
int main(){
    int n; scanf("%d",&n);
    f[0]=1;
    for (int i=3;i<=n;i++){
        for (int j=3;j<=i;j++)
            (f[i]+=f[i-j])%=M;
    }
    printf("%d\n",f[n]);
    return 0;
}
