```
class Solution {
public:
int integerBreak(int n) {
if(n==2)
return 1;
if(n==3)
return 2;
int b=n%3;
int result=INT_MIN;
if(b==0){
result = pow(3,n/3);
}else if(b==1){
result = 4*pow(3,n/3 -1);
}else{
result = 2*pow(3,n/3);
}
return result;
}
```

};