```
public int integerBreak(int n) {
if(n == 2){
return 1;
}
int[] table = new int[n + 1];
table[1] = 0;
table[2] = 1;
for(int i = 3; i <= n; i++){
for(int j = 2; j < i; j++){
table[i] = Math.max(table[i], table[j] * (i - j));
table[i] = Math.max(table[i], j * (i - j));
}
}
return table[n];
}
```