Problem: A function $f \colon \RR \to \RR$ is
\emph{essentially increasing}
if $f(s) \leq f(t)$ holds
whenever $s\leq t$ are real numbers such that $f(s)\neq 0$ and $f(t)\neq 0$.

Find the smallest integer $k$ such that
for any $2022$ real numbers $x_1$, $x_2$, \dots, $x_{2022}$,
there exist $k$ essentially increasing functions $f_1, \dots, f_k$ such that
\[ f_1(n) + f_2(n) + \dotsb + f_k(n) = x_n
  \qquad \hbox{ for every } n = 1, 2, \dots, 2022. \]

Solution: The answer is $11$ and, more generally, if $2022$ is replaced by $N$
then the answer is $\left\lfloor \log_2 N \right\rfloor + 1$.

\paragraph{Bound.}
Suppose for contradiction that $2^k-1 > N$
and choose $x_n = -n$ for each $n = 1, \dots, N$.
Now for each index $1 \le n \le N$, define
\[ S(n) = \left\{
    \text{indices $i$ for which $f_i(n) \neq 0$}
  \right\} \subseteq \{1,\dots,k\}.
\]
As each $S(nt)$ is nonempty, by pigeonhole, two $S(n)$'s coincide,
say $S(n) = S(n')$ for $n < n'$.
But it's plainly impossible that $x_n > x_{n'}$ in that case
due to the essentially increasing condition.

\paragraph{Construction.}
It suffices to do $N = 2^k-1$.
Rather than drown the reader in notation, we'll just illustrate
an example of the (inductive) construction for $k=4$.
Empty cells are zero.
\[
  \begin{array}{r|rrrr}
    & f_1 & f_2 & f_3 & f_4 \\ \hline
    x_1 = 3 & \mathbf{\color{red}3} &&& \\ \hline
    x_2 = 1 & 10 & \mathbf{\color{red}-9} && \\
    x_3 = 4 & & \mathbf{\color{red}4} && \\ \hline
    x_4 = 1 & 100 & 200 & \mathbf{\color{red}-299} & \\
    x_5 = 5 & & 200 & \mathbf{\color{red}-195} & \\
    x_6 = 9 & 100 & & \mathbf{\color{red}-91} & \\
    x_7 = 2 & & & \mathbf{\color{red}2} & \\ \hline
    x_8 = 6 & 1000 & 2000 & 4000 & \mathbf{\color{red}-6994} \\
    x_{9} = 5 & & 2000 & 4000 & \mathbf{\color{red}-5995} \\
    x_{10} = 3 & 1000 & & 4000 & \mathbf{\color{red}-4997} \\
    x_{11} = 5 & & & 4000 & \mathbf{\color{red}-3995} \\
    x_{12} = 8 & 1000 & 2000 & & \mathbf{\color{red}-2992} \\
    x_{13} = 9 & & 2000 & & \mathbf{\color{red}-1991} \\
    x_{14} = 7 & 1000 & & & \mathbf{\color{red}-993} \\
    x_{15} = 9 & & & & \mathbf{\color{red}9}
  \end{array}
\]
The general case is handled in the same way with powers of $10$
replaced by powers of $B$, for a sufficiently large number $B$.