How many sequences of real numbers $a_1, a_2, \ldots, a_9$ satisfy 
\[ |a_1 - 1| = |a_2 - a_1| = \cdots = |a_9 - a_8| = |1 - a_9| = 1? \]

Let's think step by step and output the final answer within \boxed{}.
user