Let \(a_n\) be a sequence of real numbers such that \( a_1 = 2 \), and for \( n \geq 1 \), \( a_{n+1} = \frac{2a_n + 1}{a_n + 1} \).