#include <cstdio>
using namespace std;
int n;
bool used[1001]={false};
unsigned long long maxnum=0;
void tryit(int num,int rest,unsigned long long mul)
{
int i;
if (rest==0)
{
if (mul>maxnum)
maxnum=mul;
return;
}
for (i=num+1;i<=(rest>>1);i++)
{
if (!used[i])
{
used[i]=true;
tryit(i,rest-i,mul*i);
used[i]=false;
}
}
if (!used[rest])
tryit(rest,0,mul*rest);
}
int main(void)
{
freopen("best.in","r",stdin);
freopen("best.out","w",stdout);
int i;
scanf("%d\n",&n);
for (i=1;i<=(n>>1);i++)
{
used[i]=true;
tryit(i,n-i,i);
used[i]=false;
}
printf("%d\n",maxnum);
fclose(stdin);
fclose(stdout);
return(0);
}