The number of shells in an element can be determined by the number of an electrons an element has.
The first shell can hold 2 electrons
The second holds 8
The third holds 18 & so on
To see how many shells there are place each electron you have from your given element in a shell,
When a shell fills up move on to the next one...