For the s function, analyze it like this.
1 If n is 1, directly return 1.
2 If n is not 1, then n+S(n- 1) is returned.
Then, continue to look down, s (n) = n+s (n- 1), s (n- 1) = n- 1+s (n-2), continue to push, there are:
s(n)= n+n- 1+n-2+……+4+3+2+ 1
Finally, the result is returned.