```
class Solution(object):
def integerBreak(self, n):
"""
:type n: int
:rtype: int
"""
if n <= 3:
return n-1
mod = n%3
res = n//3
if mod == 1:
res -= 1
return (3**res)*2*2
if mod == 0:
return 3**res
return (3**res)*2
```