#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; } /* 想定TLE解法 始点を0にしてA_iをN通り決めうちするO(N^3) */ const int mod=1e9+7; int N; inline LL count(int s){ vector dp(N,0); dp[s]=1; REP(i,N-1){ vector nxt(N,0); REP(j,N-1){ dp[j+1]+=dp[j]; if(dp[j+1]>=mod)dp[j+1]-=mod; } REP(j,N){ nxt[j]=dp[min(N-1,j+i)]; } swap(dp,nxt); } LL res=0; REP(i,s+1)res+=dp[i]; return res%mod; } int main(){ cin>>N; LL res=0; REP(i,N)res+=count(i); cout<