Determine the maximal length $L$ of a sequence $a_{1}, \ldots, a_{L}$ of positive integers satisfying both the following properties:
- every term in the sequence is less than or equal to $2^{2023}$, and
- there does not exist a consecutive subsequence $a_{i}, a_{i+1}, \ldots, a_{j}$ (where $1 \leqslant i \leqslant j \leqslant L$ ) with a choice of signs $s_{i}, s_{i+1}, \ldots, s_{j} \in\{1,-1\}$ for which
$$
s_{i} a_{i}+s_{i+1} a_{i+1}+\cdots+s_{j} a_{j}=0
$$
Please provide the value of $n+1$ if the answer can be expressed in the form $2^{n} - 1$. 

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