For any nonempty set $S$ of numbers, let $\sigma(S)$ and $\pi(S)$ denote the sum and product, respectively, of the elements of $S$. Prove that\[\sum\frac{\sigma(S)}{\pi(S)}=(n^2+2n)-\left(1+\frac12+\frac13+\cdots+\frac1n\right)(n+1),\]
where $\sum$ denotes a sum involving all nonempty subsets $S$ of $\{1,2,3,\ldots,n\}$.