#include<iostream>
#include<string>
using namespace std;
class FIELDDiagrams
{
public:
void dfs ( int k, int max, int n , long long& sum , int a )
{
int i;
if ( max==n )
{
sum++;
return;
}
if (( k-1)*a+1<max-n )
return ;
for ( i=a ; i>=1 ; i-- )
dfs(k-1,max,n+i ,sum , i );
}
long long countDiagrams ( int t )
{
long long map[40][40],sum=0,i;
memset(map,0,sizeof(map));
for ( i=1 ; i<=t*(t-1)/2 ; i++ )
dfs( t, i,0,sum, i );
return sum;
}
};
int main ( )
{
FIELDDiagrams a;
int n;
while (cin>>n)
cout<<a.countDiagrams (n)<<endl;
}