According to the Bohr's atomic model, the number of maximum electrons that can be filled in a shell is given by the formula 2n2, where n is the shell number.
The first and innermost shell is K shell (n=1), next shell is L shell (n=2), then M shell (n=3), then N shell (n=4) and so on.
The maximum electrons in second shell i.e. L shell is: 2n2 = 2 x (2)2 = 2 x 4 = 8.