Explanation
The first shell can hold up to 2 electrons, the 2nd 8, the 3rd 18, the 4th 32, and the 5th and higher can hold up to 50 or more theoretically.