Hi everybody,

This Tuesday there will be a Moscow programming competition for school students of grades from 6 to 9. This contest is prepared by Moscow Olympiad Scientific Committee that you may know by Moscow Open Olympiad, Moscow Team Olympiad and Metropolises Olympiad (rounds 327, 342, 345, 376, 401, 433, 441, 466, 469, 507, 516, 541, 545, 567, 583, 594, 622, 626, 657, 680).

Round will be held at Feb/23/2021 12:05 (Moscow time). You will be given 5 problems and 2 hours to solve them. Round will be rated for second division (rating below 2100). As usual, participants from the first division can participate in a contest out of competition.

Problems are prepared by grphil, Jatana, rip, Sehnsucht, DebNatkh, KiKoS, wrg0ababd, V--o_o--V, voidmax, meshanya, vintage_Vlad_Makeev under my supervision.

Thanks to adedalic for the round coordination, cdkrot and meshanya for statement translation, and also thanks for MikeMirzayanov for systems Codeforces and Polygon, which was used to prepare problems of this olympiad.

Also thanks to Noam527 for providing an additional problem that helped to create (I hope) a balanced problem set for the round.

Good luck everybody!

Due to the official competition source codes of other participants will not be available for an hour after the end of the round.

**UPD1**: Thanks to LHiC, awoo, ScarletS, adarsh7777, kassutta, raj_mehta_ for testing.

**UPD2:**

Scoring distribution: 500 — 1000 — 1500 — 2250 — 3000

**UPD3:** Editorial

**UPD4:** Winners!

Div. 2:

Div. 1 + Div. 2: