python3 Sorting O(nlogn) solution
```\nclass Solution:\n    def getMaximumConsecutive(self, coins: List[int]) -> int:\n        coins.sort()\n        ans = 0\n        for i in range(len(coins)):\
```\nclass Solution:\n    def getMaximumConsecutive(self, coins: List[int]) -> int:\n        coins.sort()\n        ans = 0\n        for i in range(len(coins)):\n            if coins[i]<=ans+1:\n                ans += coins[i]\n            else:\n                break\n        return ans+1
['Sorting', 'Python3']