Problem 7.2. Each of the natural numbers $1,2,3, \ldots, 377$ is painted either red or blue (both colors are present). It is known that the number of red numbers is equal to the smallest red number, and the number of blue numbers is equal to the largest blue number. What is the smallest red number?