Easy CPP Solution
\n# Code\n\nclass Solution {\npublic:\n    int getMaximumConsecutive(vector<int>& coins) \n    {\n        sort(coins.begin(),coins.end());\n        int cur=0;\n
\n# Code\n```\nclass Solution {\npublic:\n    int getMaximumConsecutive(vector<int>& coins) \n    {\n        sort(coins.begin(),coins.end());\n        int cur=0;\n        for (auto it: coins)\n        {\n          if (it<=cur) cur+=it;\n          else if (it==cur+1) cur+=it;\n          else return cur+1;\n        }\n        return cur+1;\n    }\n};\n```
['C++']