#include using namespace std; #define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define rep(i,n) repl(i,0,n) #define mp(a,b) make_pair((a),(b)) #define pb(a) push_back((a)) #define all(x) (x).begin(),(x).end() #define uniq(x) sort(all(x)),(x).erase(unique(all(x)),end(x)) #define fi first #define se second #define dbg(...) _dbg(#__VA_ARGS__",", __VA_ARGS__) void _dbg(string){cout< void _dbg(string s,H h,T... t){int l=s.find(',');cout< ostream& operator<<(ostream& o, const pair &p){o<<"("< ostream& operator<<(ostream& o, const vector &v){o<<"[";for(T t:v){o<>n; fill(dp[0][0], dp[n+1][0], 0); repl(i,1,n+1) dp[0][i][0] = 1; repl(i,2,n+1) dp[0][i][1] = 1; repl(i,1,n) rep(j,2){ repl(k,1,n+1){ dp[i][k][j] = dp[i][k-1][j]; if(i==1){ if(k==1) for(int l=1; l-1<1;l++) dp[i][k][j] += dp[i-1][l][j]; else if(i+k-1>0 && i+k-1<=n) dp[i][k][j] += dp[i-1][i+k-1][j]; } else { if(k==1) for(int l=1; l-i+1<1;l++) dp[i][k][j] += dp[i-1][l][j]; else if(i+k-2>0 && i+k-2<=n) dp[i][k][j] += dp[i-1][i+k-2][j]; } dp[i][k][j] %= MOD; } } long ans = 0; repl(i,1,n+1) ans += dp[n-1][i][i==n]; cout << ans %MOD << endl; return 0; }