make s the subject of the formula in d=c-s/n

d=c-s/n

s/n = c-d
s = n(c-d)

If you meant

d=(c-s)/n
nd = c-s
s = c-nd