Greedy Prefix
\nclass Solution:\n    def getMaximumConsecutive(self, coins: List[int]) -> int:\n        coins.sort()\n        if coins[0] > 1:\n            return 1\n        
```\nclass Solution:\n    def getMaximumConsecutive(self, coins: List[int]) -> int:\n        coins.sort()\n        if coins[0] > 1:\n            return 1\n        p = 0\n        for i in range(len(coins)):\n            p += coins[i]\n            if i == len(coins) - 1 or p + 1 < coins[i + 1]:\n                return p + 1\n```
['Python']