# include # include # include # include # include # include # include # include # include # include # include # include # include # include # include #include #include #include #include #include typedef long long int ll; const int INF = 1 << 30; using namespace std; ll gcd(ll a, ll b) { for (ll i=std::min(a, b);i>=1;--i) { if (i%a == 0 && b%i == 0)return i; } } #define pp pair #define FOR(i,a,n) for(int i=(ll)a;i<(ll)n;++i) #define TFOR(i,n)FOR(i,0,n) #define ALL(x) x.begin(),x.end() int main() { ll n; cin >> n; ll ans=0; ll bo = 1, ci = 1; for (ll i = 1; i <= n/ 2;++i) { bo *= i; ci *= (n - i+1); //cout << ci << "/" << bo << endl; if (ci%bo == 0 && (ci / bo) % 2 == 0)ans += ((n%2==0&&i==n/2)?1:2); bo /= gcd(bo, ci); ci /= gcd(bo, ci); } cout << ans << endl; return 0; }