#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define debug(x) cout<<":["<<x<<"XE]"<<endl;
#define debug2(x,y) cout<<":["<<x<<" "<<y<<"XE]"<<endl;
#define mod 1000000007
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
ll l1[2000+5],n,x,dp[2005][2005];
int func(ll pos,ll sum)
{
//debug2(pos,sum)
if(pos>n){
if(sum==x)return 1;
else return 0;
}
if(sum>=x){
if(sum==x)return 1;
else return 0;
}
if(dp[pos][sum]!=-1)return dp[pos][sum];
ll x=func(1,sum);
ll z=func(pos,sum+l1[pos]);
return dp[pos][sum]=(((x%mod)+(z%mod))%mod);
}
int main()
{
cin>>x;n=x;
for(int i=1;i<=n;i++){
l1[i]=i+2;
//cin>>l1[i];
}
memset(dp,-1,sizeof dp);
cout<<func(1,0);
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KI2luY2x1ZGUgPGV4dC9wYl9kcy9hc3NvY19jb250YWluZXIuaHBwPgojaW5jbHVkZSA8ZXh0L3BiX2RzL3RyZWVfcG9saWN5LmhwcD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKdXNpbmcgbmFtZXNwYWNlIF9fZ251X3BiZHM7CgojZGVmaW5lIGxsIGxvbmcgbG9uZwojZGVmaW5lIGRlYnVnKHgpIGNvdXQ8PCI6WyI8PHg8PCJYRV0iPDxlbmRsOwojZGVmaW5lIGRlYnVnMih4LHkpIGNvdXQ8PCI6WyI8PHg8PCIgIjw8eTw8IlhFXSI8PGVuZGw7CiNkZWZpbmUgbW9kIDEwMDAwMDAwMDcKI2RlZmluZSBvcmRlcmVkX3NldCB0cmVlPGludCwgbnVsbF90eXBlLGxlc3M8aW50PiwgcmJfdHJlZV90YWcsdHJlZV9vcmRlcl9zdGF0aXN0aWNzX25vZGVfdXBkYXRlPgoKbGwgbDFbMjAwMCs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