2 lines java
{Arrays.sort(nums);\n        int l=nums.length-1;\n     return nums.length>1?((nums[l-1]-1)*(nums[l]-1)):0;\n    }
{Arrays.sort(nums);\n        int l=nums.length-1;\n     return nums.length>1?((nums[l-1]-1)*(nums[l]-1)):0;\n    }
['Java']