#include <bits/stdc++.h>
#define ll long long int
#define N 101
#define mod 1000000007
using namespace std;
int main()
{
ll n;
cin >> n;
ll sum = (n*(n + 1)) / 2;
if(sum &1)
{
cout << "0";
return 0;
}
else
{
sum /= 2;
ll dp[2][sum+1];
for(ll i = 0 ; i < 2;i++)
dp[i][0] = 1;
for(ll i = 1;i <= sum;i++)
dp[0][i] = 0;
for(ll i = 1; i <= n;i++)
{
for(ll j = 1; j <= sum;j++)
{
if(i <= j)
dp[1][j] = (dp[0][j] + dp[0][j - i]) % mod;
else
dp[1][j] = dp[0][j];
}
for(ll j = 0;j <= sum;j++)
dp[0][j] = dp[1][j];
}
cout << dp[1 ][sum]/2;
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgbGwgbG9uZyBsb25nIGludAojZGVmaW5lIE4gMTAxCiNkZWZpbmUgbW9kIDEwMDAwMDAwMDcKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkKewogICAgbGwgbjsKICAgIGNpbiA+PiBuOwogICAgbGwgc3VtID0gKG4qKG4gKyAxKSkgLyAyOwogICAgaWYoc3VtICYxKQogICAgewogICAgICAgIGNvdXQgPDwgIjAiOwogICAgICAgIHJldHVybiAwOwogICAgfQogICAgZWxzZQogICAgewogICAgICAgIHN1bSAvPSAyOwogICAgICAgIGxsIGRwWzJdW3N1bSsxXTsKICAgICAgICBmb3IobGwgaSA9IDAgOyBpIDwgMjtpKyspCiAgICAgICAgICAgIGRwW2ldWzBdID0gMTsKICAgICAgICBmb3IobGwgaSA9IDE7aSA8PSBzdW07aSsrKQogICAgICAgICAgICBkcFswXVtpXSA9IDA7CgogICAgICAgIGZvcihsbCBpID0gMTsgaSA8PSBuO2krKykKICAgICAgICB7CiAgICAgICAgICAgIGZvcihsbCBqID0gMTsgaiA8PSBzdW07aisrKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBpZihpIDw9IGopCiAgICAgICAgICAgICAgICAgICAgZHBbMV1bal0gPSAoZHBbMF1bal0gKyBkcFswXVtqIC0gaV0pICUgbW9kOwogICAgICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgICAgIGRwWzFdW2pdID0gZHBbMF1bal07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZm9yKGxsIGogPSAwO2ogPD0gc3VtO2orKykKICAgICAgICAgICAgICAgIGRwWzBdW2pdID0gZHBbMV1bal07CiAgICAgICAgfQogICAgICAgICAgICBjb3V0IDw8IGRwWzEgXVtzdW1dLzI7CiAgICB9CiAgICByZXR1cm4gMDsKfQo=