Simple C Solution
Code\n\nint cmp(const void * a , const void *b)\n{\n    return *(int*)a - *(int*)b;\n}\nint getMaximumConsecutive(int* coins, int coinsSize) {\n    int prev = 0
# Code\n```\nint cmp(const void * a , const void *b)\n{\n    return *(int*)a - *(int*)b;\n}\nint getMaximumConsecutive(int* coins, int coinsSize) {\n    int prev = 0 ;\n    qsort(coins,coinsSize,sizeof(int),cmp);\n    for(int i = 0 ; i < coinsSize ; i++)\n    {\n        if(prev + 1 < coins[i])\n            return prev + 1;\n        prev = prev + coins[i];\n    }\n    return prev + 1 ;\n}\n```
['C']