We want to break the given number into as many "3" as possible, until the n shrink to 4. After breaking, we should only have 3s and 2s.

public class Solution {

```
public int integerBreak(int n) {
if (n == 2 || n == 3) {
return n - 1;
}
int result = 1;
while (n > 4) {
result *= 3;
n -= 3;
}
result *= n;
return result;
}
```

}