program best;
var
n,i,j,k:longint;
ans,max:int64;
f:array[0..1000,0..1000]of int64;
begin
assign (input,'best.in');
reset (input);
assign (output,'best.out');
rewrite (output);
readln (n);
for i:=0 to n do
f[0,i]:=1;
for i:=1 to n do
for j:=1 to i do
begin
max:=0;
for k:=1 to j do
if f[i-k,k-1]*k>max then
max:=f[i-k,k-1]*k;
f[i,j]:=max
end;
ans:=0;
for i:=1 to n do
if f[n,i]>ans then
ans:=f[n,i];
writeln (ans);
close (input);
close (output)
end.