greedy
\n\n# Code\n\nclass Solution:\n    def getMaximumConsecutive(self, coins: List[int]) -> int:\n        coins.sort()\n        ans=0\n        tot=0\n        for i 
\n\n# Code\n```\nclass Solution:\n    def getMaximumConsecutive(self, coins: List[int]) -> int:\n        coins.sort()\n        ans=0\n        tot=0\n        for i in range(len(coins)):\n            if tot-coins[i]>=-1:\n                tot+=coins[i]\n                ans=tot\n            else:\n                break\n        return ans+1\n\n\n        \n```
['Python3']