#include <iostream>
using namespace std;
const int mod = 1000000007;
int a[10000];
int solve(int n){
int *A = a + n;
A[0] = 1; A[-1] = 0;
int k = 0, e = 1;
for (int i = 0; i <= n; ++i){
int Am = 0;
A[k + e] = 0;
e = -e;
for (int j = 0; j <= i; ++j){
Am += A[k];
if (Am >= mod) Am -= mod;
A[k] = Am;
k += e;
}
}
return n % 2 ? A[n / 2] : A[-n / 2];
}
int main()
{
int n;
cin >> n;
cout << solve(n) << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwpjb25zdCBpbnQgbW9kID0gMTAwMDAwMDAwNzsKaW50IGFbMTAwMDBdOwppbnQgc29sdmUoaW50IG4pewoJaW50ICpBID0gYSArIG47CglBWzBdID0gMTsgQVstMV0gPSAwOwoJaW50IGsgPSAwLCBlID0gMTsKCWZvciAoaW50IGkgPSAwOyBpIDw9IG47ICsraSl7CgkJaW50IEFtID0gMDsgCgkJQVtrICsgZV0gPSAwOyAKCQllID0gLWU7CgkJZm9yIChpbnQgaiA9IDA7IGogPD0gaTsgKytqKXsKCQkJQW0gKz0gQVtrXTsgCgkJCWlmIChBbSA+PSBtb2QpIEFtIC09IG1vZDsKCQkJQVtrXSA9IEFtOyAKCQkJayArPSBlOwoJCX0KCX0KCXJldHVybiBuICUgMiA/IEFbbiAvIDJdIDogQVstbiAvIDJdOwp9CgppbnQgbWFpbigpCnsKCWludCBuOyAKCWNpbiA+PiBuOwoJY291dCA8PCBzb2x2ZShuKSA8PCBlbmRsOwoJcmV0dXJuIDA7Cn0K