Answer: 2025.

Solution. Let $X=\overline{a b c d}=1000 a+100 b+10 c+d$, where $a, b, c, d$ are digits and $a \neq 0$.

According to the condition, $X-a-b-c-d=999 a+99 b+9 c=K^{2}$, where $K=20 u+5, K=21 v+3$.

Notice that $999 a+99 b+9 c \vdots 9$, i.e., $K^{2} \vdots 9$, which means $K=3 M$, and $M^{2}=111 a+11 b+c \leq$ $111 \cdot 9+11 \cdot 9+9=1107, M \leq 33, K=3 M \leq 99$.

Thus, we need to find among the numbers from 1 to 99 all those numbers that are divisible by 3, give a remainder of 5 when divided by 20, and a remainder of 3 when divided by 21. This can be done in various ways, for example, by simple enumeration: list all numbers from 1 to 99 that give a remainder of 3 when divided by 21:

$$
3,24,45,66,87
$$

Among them, only one number - 45 gives a remainder of 5 when divided by 20. That is, $K=45$, and $N=2025$.
Problem 3. If the sum of the digits of a four-digit number $X$ is subtracted from $X$, the result is a natural number $N=K^{2}$, where $K$ is a natural number that gives a remainder of 5 when divided by 20 and a remainder of 3 when divided by 21. Find the number $N$.