```
class Solution {
public:
int integerBreak(int n) {
if(n < 4) return n - 1;
int threes = n / 3, twos = 0, remain = n % 3;
if(remain == 1) {
threes--;
twos = 2;
} else if(remain == 2) {
twos = 1;
}
return ((int)pow(3, threes)) << twos;
}
};
```