Python3 Solution
\n\nclass Solution:\n    def maxProduct(self, nums: List[int]) -> int:\n        nums.sort()\n        return (nums[-1]-1)*(nums[-2]-1)\n
\n```\nclass Solution:\n    def maxProduct(self, nums: List[int]) -> int:\n        nums.sort()\n        return (nums[-1]-1)*(nums[-2]-1)\n```
['Python', 'Python3']