5-> 2 3 = 6

6-> 3 3 = 9

7-> 4 3 = 6

8-> 3 3 2 = 18

In order to produce maximum product, every number (greater than 4)should be broken down into multiple 3s.

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