Note that the combinatorial species $\mathcal{Q}$ of permutations with fixed points marked is
$$\mathcal{Q} = \mathfrak{P}
\left(\mathcal{U}\mathcal{Z} + \mathfrak{C}_2(\mathcal{Z})
+ \mathfrak{C}_3(\mathcal{Z}) + \mathfrak{C}_4(\mathcal{Z})+\ldots\right).$$
Hence the generating function of these marked permutations is
$$G(z, u) =
\exp\left(uz+\frac{z^2}{2}+\frac{z^3}{3}+\frac{z^4}{4}+\ldots\right)$$
which is
$$\exp\left(uz-z+\frac{z}{1}+\frac{z^2}{2}+\frac{z^3}{3}+\frac{z^4}{4}+\ldots\right)
\\= \exp(uz-z) \exp\log\frac{1}{1-z} = \frac{1}{1-z} \exp(uz-z).$$
We can recover the total number of permutations on $n$ with $k$ fixed points from this generating function, it is given by
$$n! [z^n][u^k]\frac{1}{1-z} \exp(uz-z)
= n! [z^n] \frac{1}{1-z} \exp(-z) \frac{z^k}{k!}
\\= \frac{n!}{k!} [z^{n-k}] \frac{1}{1-z} \exp(-z)
= \frac{n!}{k!} \sum_{m=0}^{n-k}\frac{(-1)^m}{m!}.$$
It follows that the OGF of the expected number of fixed points is
$$\left.\frac{d}{du} G(z,u)\right|_{u=1}
= \left.\frac{1}{1-z} \exp(uz-z)\times z\right|_{u=1}
= \frac{z}{1-z}. $$
Now since $$[z^n]\frac{z}{1-z} =1,$$
we expect there to be on average one person who recovers his hat.
The differentiation works here because it turns the term $q\times u^k \times z^n/n!$ into $q\times k\times z^n/n!$ and we see that the factor $n!$ which is necessary for the average is already present in the GF.