#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int f[31][31];
int dyna(int n, int m) {
int i, j, k;
for (i = 1; i <= n; i++)
f[i][1] = i;
for (j = 2; j <= m; j++) {
for (i = j; i <= n; i++) {
f[i][j] = 0;
for (k = j - 1; k < i; k++)
f[i][j] = max(f[i][j], f[k][j - 1]*(i - k));
}
}
return f[n][m];
}
int main(int argc, char* argv[]) {
int n, m;
int tmp, ans = 0;
scanf("%d", &n);
for (m = 1; m <= n; m++) {
tmp = dyna(n, m);
ans = max(ans, tmp);
}
printf("%d\n", ans);
return 0;
}
|