In this problem, there are conditional blocks. If your solution works correctly for certain constraints, it will receive a certain number of points. Note that each test is graded individually.

\begin{enumerate}
\item (33 points): $x \le 10^6$;
\item (33 points): $x \le 10^9$;
\item (34 points): without additional constraints.
\end{enumerate}