/*
TASK: necklace
LANG: C++
*/
#include <iostream>
#include <cmath>
using namespace std;
unsigned long long int ff[16] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 62270208, 871782912, 1307674368};
unsigned long long int br=0,n;
void proc(int xx, int yy)
{
     int x=xx,y=yy,px=n/2+n%2-1,py=n/2;
     //cout << x << ' ' << y << ' ';
     if (x-1>px/2) x=px-x+1;
     if (y>py/2) y=py-y;
     long long int b1=0,i,s1=1,b2=0,s2=1;
     for (i=0; i<x-1; i++)
     {
         s1=s1*(px-i);
     }
     for (i=0; i<y; i++)
     {
         s2=s2*(py-i);
     }
     unsigned long long int a,b;
     //cout << x << ' ' << y << ' ' << s1 << ' ' << s2 << ' ' << (s1/ff[x])*(s2/ff[y]) << '\n';
     if (x<1) x=1;
     br+=(s1/ff[x-1])*(s2/ff[y]);
}
int main()
{
    ff[15]*=1000;
    ff[14]*=100;
    ff[13]*=100;
    int i,j;
    cin >> n;
    for (i=1; i<=n/2+n%2; i++)
        for (j=0; j<=n/2; j++)
            if (abs(i-j)%3==0)
             proc(i, j);
    cout << br << '\n';
    return 0;
}
             
