simple and easy Python solution
\n# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n###### Let\'s Connect on Linkedin: www.linkedin.com/in/shishirrsiam\n\n\n\n# Code\npython3 []\nclass Sol
\n# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n###### Let\'s Connect on Linkedin: www.linkedin.com/in/shishirrsiam\n\n\n\n# Code\n```python3 []\nclass Solution:\n    def maxCount(self, banned: List[int], n: int, maxSum: int) -> int:\n        ans, curSum = 0, 0\n        banned = set(banned)\n        for num in range(1, n + 1):\n            if maxSum < curSum + num: break\n            if num in banned: continue\n\n            ans += 1\n            curSum += num\n        return ans\n```
['Array', 'Hash Table', 'Greedy', 'Sorting', 'Python', 'Python3']