Consider the probability space $\Omega = [0,1), \mathcal{A} = \mathcal{B}([0,1))$ and $$\mathbb{P}(A) = \frac{1}{\log(2)} \int_A \frac{1}{1+x} dx.$$ In the lecture we learned that the map $\tau(x)$ with $\tau(x) = \frac{1}{x} - \big\lfloor \frac{1}{x} \big\rfloor$ for $x > 0$ and $\tau(0) = 0$ for $x = 0$ is a measure preserving transformation on $\Omega$ and that for irrational $x \in \Omega$ the $a_i := A(\tau^{i-1}(x))$, where $A(x) := \lfloor 1/x \rfloor$, constitute the continued fraction expansion of $x$, i.e. $x = [0,a_1,a_2,\ldots]$. Furthermore we have already learned that $\tau$ is ergodic.
Use this to show that
$$\frac{1}{n} \sum_{k=1}^n f(a_k(x)) \longrightarrow \frac{1}{\log(2)} \int_0^1 \frac{f(\lfloor 1/x \rfloor)}{1+x} dx \qquad (a.s.)$$
for every function $f:[0,1) \rightarrow \mathbb{R}$ with $\int_0^1 \lvert f(\lfloor 1/x \rfloor ) \rvert dx < \infty$. Conclude that
$$\biggl( \prod_{k=1}^n a_k(x) \biggr)^{1/n} \longrightarrow K \qquad (a.s.)$$ , where $K := \exp \biggl( \frac{1}{\log(2)} \int_0^1 \frac{\log(\lfloor 1/x \rfloor)}{1+x} dx \biggr)$ is Khinchin's constant.
Remark: The Wikipedia article on Khinchin's constant proves this, but it uses a different definition of $K$.
I think that the first equation
$$\frac{1}{n} \sum_{k=1}^n f(a_k(x)) \longrightarrow \frac{1}{\log(2)} \int_0^1 \frac{f(\lfloor 1/x \rfloor)}{1+x} dx \qquad (a.s.)$$
is just an application of Birkhoff's Ergodic Theorem, but I do not get how to make the conclusion.