Solve Q= (N-S)/ N for N

So when I multiply both sides by N
I get Q(N)= N-S
I know I am doing something wrong, the answer is in the book which is
N=S/(1-Q)but I don't understand were the 1 comes from. Could you write it out step by step, so I can see what I don't yet understand?

Here's one way to solve for N.

Q = (N - S)/N

Factor out N in the numerator:

Q = N(1 - S/N)/N

Cancel out N in both numerator and denominator to end up with this:

Q = 1 - S/N

Subtract 1 from both sides:

Q - 1 = - S/N

Multiply both sides by N:

N(Q - 1) = - S

Divide both sides by (Q - 1):

N = - S/(Q - 1)

Factor out -1 to end up with this:

N = S / (1 - Q)

I hope this will help.

thanks, I would have never gotten that far. I didn't know that the N could be factored out like that- to get 1, so with this knowledge I try other problems and see if it works out for me.