Answer
$n=\dfrac{L-a}{d} +1$
Work Step by Step
Subtract $a$ to both sides to have:
$L-a=(n-1)d$
Divide $d$ to both sides to have:
$\dfrac{L-a}{d} = \dfrac{(n-1)d}{d}
\\\dfrac{L-a}{d} = n-1$
Add 1 to both sides to have:
$\dfrac{L-a}{d} +1 = n
\\n=\dfrac{L-a}{d} +1$