#include using namespace std; typedef long long LL; #define CIN_ONLY if(1) struct cww{cww(){ CIN_ONLY{ ios::sync_with_stdio(false);cin.tie(0); } }}star; #define fin "\n" #define FOR(i,bg,ed) for(int i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(),(v).end() #define fi first #define se second #define pb push_back #define DEBUG if(0) #define REC(ret, ...) std::function template inline bool chmin(T &l,T r) {bool a=l>r;if(a)l=r;return a;} template inline bool chmax(T &l,T r) {bool a=l istream& operator>>(istream &is,vector &v){ for(auto &it:v)is>>it; return is; } const int mod=1e9+7; vector count(LL N,vector ini){ auto dp=ini; REP(i,N-1){ REP(j,N-1)(dp[j+1]+=dp[j])%=mod; vector nxt(N,0); LL sa=max(i-1,0); REP(j,N){ (nxt[j]+=dp[min(N-1,j+sa)])%=mod; } swap(dp,nxt); } return dp; } int main(){ int N; cin>>N; vector S(N,0); S[0]=1; auto A = count(N,S); fill(ALL(S),1); auto B=count(N,S); LL res=0; for(auto &it:B)(res+=it)%=mod; (res+=mod-A.back())%=mod; cout<