[Python3] greedy
\n\nclass Solution:\n    def getMaximumConsecutive(self, coins: List[int]) -> int:\n        ans = 1\n        for x in sorted(coins): \n            if ans < x: b
\n```\nclass Solution:\n    def getMaximumConsecutive(self, coins: List[int]) -> int:\n        ans = 1\n        for x in sorted(coins): \n            if ans < x: break \n            ans += x\n        return ans\n```
['Python3']