Kazzytsina t.v.

Petrov booked an apartment in a new building with five identical entrances. Initially, the entrances were numbered from left to right, and Petrov's apartment had the number 636. Then the developer changed the numbering to the opposite direction (from right to left, see the figure). As a result, Petrov's apartment number became 242. How many apartments are in the building? (The order of apartment numbering within each entrance did not change.)

![](https://cdn.mathpix.com/cropped/2024_05_06_43e7ff204cbd87ef9854g-19.jpg?height=83&width=732&top_left_y=1325&top_left_x=663)
From the condition, it follows that the number of entrances to the left and right of Petrov's entrance differ by 0.2 or 4, that is, by an even number. At the same time, the difference between the apartment numbers of Petrov under the two numbering options shows how many more apartments are in the entrances to the left of Petrov's entrance compared to those to the right. Therefore, $636-242=394$ is the number of apartments in an even number of entrances. Since $394=197 \cdot 2$, and 197 is a prime number, there must be 197 apartments in the entrance. Thus, in this building, $197 \cdot 5=985$ apartments.

## Answer

985 apartments.