Let \( a_0 = 0 \) and define \( a_n = \frac{1}{2} (1 + a_{n-1}) \) for all positive integers \( n \geq 1 \). The least value of \( n \) for which \( |1 - a_n|<\frac{1}{2^{10}} \) is ______.