Say that a function $f : \{1, 2, \ldots, 1001\} \to \mathbb{Z}$ is *almost* polynomial if there exists a polynomial $p(x) = a_{200}x^{200} + \ldots + a_1x + a_0$ where each $a_n$ is an integer with $|a_n| \le 201$, and $|f(x) - p(x)| \le 1$ for all $x \in \{1, 2, \ldots, 1001\}$. Let $N$ be the number of such almost polynomial functions. Compute the remainder when $N$ is divided by $199$.

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