We say that a $2023$-tuple of nonnegative integers $(a_1,\ldots,a_{2023})$ is \textit{sweet} if the following conditions hold:

- $a_1+a_2+\ldots+a_{2023}=2023$
- $\frac{a_1}{2}+\frac{a_2}{2^2}+\ldots+\frac{a_{2023}}{2^{2023}}\le 1$

Determine the greatest positive integer $L$ so that $a_1+2a_2+\ldots+2023a_{2023}\ge L$ holds for every sweet $2023$-tuple $(a_1,\ldots,a_{2023})$.

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