But the nucleus has it's own shells, and those are the ones that need to be filled for it to be stable.
However not as much is known about the nucleus shells, how many in each level, etc. Read here: http://en.wikipedia.org/wiki/Nuclear_shell_model