#include<cstdio>
#include<cmath>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
const int maxn=45;
int n;
int sum;
long long f[2010]={1};
void beg(){
freopen("subsetz.in","r",stdin);
freopen("subsetz.out","w",stdout);
}
int main(){
beg();
scanf("%d",&n);
for (int i=1;i<=n;i++){
sum+=i;
for (int j=sum;j>=i;j--) f[j]+=f[j-i];
}
if (sum&1) puts("0");
else printf("%lld",f[sum>>1]>>1);
}