3. Given $n \in \mathbf{Z}_{+}$. Thomas lists all non-empty subsets of $\{1,2, \cdots, n\}$, and under each subset, he writes the product of all its elements. He then adds the reciprocals of these products, and denotes the resulting sum as $D$. Find the value of $D$.
3. From the problem, we know
$$
\begin{aligned}
& \sum_{\substack{s \subseteq\{1,2, \cdots, n\} \\
S \neq \varnothing}} \prod_{i \in S} \frac{1}{i}=\prod_{i=1}^{n}\left(1+\frac{1}{i}\right)-1 \\
= & \prod_{i=1}^{n} \frac{i+1}{i}-1=n+1-1=n .
\end{aligned}
$$