Problem 6. Having defeated Koschei, Ivan demanded gold to ransom Vasilisa from the bandits. Koschei led him to a cave and said:

"In the chest lie gold ingots. But you cannot simply take them: they are enchanted. Put one or several into your bag. Then I will put one or several from the bag back into the chest, but it must be a different number. We will take turns moving them: you into the bag, I into the chest, each time a new number. When a new move becomes impossible, you can take your bag with the ingots."

What is the maximum number of ingots Ivan can take, no matter how Koschei acts, if the chest initially contains a) 13; b) 14 gold ingots? How can he do it?

[8 points for both parts, 5 points for one] (A. V. Shapovalov)
Answer. a) 13; b) 13.

Solution. Ivan will act in such a way that each time Kashchey's move will be the only one possible: all other numbers have either already appeared in previous moves or are too large - Ivan does not have that many ingots at that moment. We will record the moves of the game as follows: the number of ingots moved (the number of ingots Ivan has after the move).
a) +2 (2), -1 (1), +3 (4), -4 (0), +6 (6), -5 (1), +7 (8), -8 (0), +10 (10), -9 (1), +11 (12), -12 (0), +13 (13).

At the end, all possible moves have been made, Ivan has all 13 ingots, so he can take them.

b) We will act the same way as in the previous part. After the move “+13 (13)”, only the move 14 is not made, but it is impossible, so Ivan can take 13 ingots.

We will prove that Ivan cannot take 14 ingots. Suppose at some point there were 14 ingots in the bag. This means there are no ingots in the chest, so the last move was made by Ivan. Then the total number of moves made is odd, and therefore some number from 1 to 14 has not appeared. Kashchey can make a move with this number, so the ingots cannot be taken yet.

Comment. One can notice that for 17, 21, and generally $4k+1$ ingots, the problem is solved similarly to part a), and for 14, 18, and generally $4k+2$ ingots - similarly to part b). One can think about solving the problem in the remaining cases (when there are $4k$ or $4k+3$ ingots).

![](https://cdn.mathpix.com/cropped/2024_05_06_13e5d2ec23c25d878726g-5.jpg?height=307&width=1197&top_left_y=200&top_left_x=128)

The first issue of the new magazine for students in grades 5-8 - "Kvantik" - has been published. The magazine is dedicated to interesting questions and problems in mathematics, linguistics, physics, and other natural sciences. You will learn a lot about the world around you.

On the pages of this issue, you will read about a remarkable scientist, learn about a president who proved theorems, conduct fascinating experiments with a Möbius strip, puzzle over seemingly simple problems, learn how to construct certain regular polygons. You will meet with amazing numbers, amusing picture problems, linguistic quirks, and other often quite unexpected things.

In each issue of the magazine

look for the problems of our contest - anyone can try their hand, and the winners will receive prizes.

"Kvantik" is published

monthly. You can subscribe at any post office of Russia Post, subscription index 84252.

All issues are always

available for purchase at the MCCME store at the address: Moscow, Bol. Vlasyevsky per., 11. Store phone: (499) 241-72-85.

Our email: kvantik@mccme.ru, website: www.kvantik.com, phone: (499) 241-74-83.

## Information on enrollment in grades 5-8 with advanced mathematics in 2012

| School | Phone | Address, URL | Grades | Periods |
| :---: | :---: | :---: | :---: | :---: |
| 2 | $(499) 137-17-69$  $(499) 137-69-31$ | Fotieva St., 18  (m. "Oktyabrskaya")  www.sch2.ru | 7,8 | from March 23  to May 25 |
| 54 | $(499) 245-99-72$  $(499) 245-54-25$ | Dovatora St., 5/9  (m. "Sportivnaya")  moscowschool54.ru | 8 | from February to  May |
| 57 | $(495) 691-85-72$  $(495) 691-54-58$ | Mal. Znamensky per., 7/10,  bld. 5 (m. "Borovitskaya")  sch57.msk.ru | 8 | from March 21  on Wednesdays  at $16^{00}$ |
| 179 | (495) 692-48-51 | Bol. Dmitrovka St., 5/6, bld. 7  (m. "Okhotny Ryad")  www.179.ru | 8 | from March 16  on Fridays  at $16^{00}$ |
| 192 | $(499) 137-33-55$  $(499) 137-72-85$ | Leninsky Prospekt 34-A  (m. "Leninsky Prospekt")  www.sch192.ru | 5,7;  additional in 8 | from April 6  on Fridays  at $16^{00}$ |
| 218 | $(495) 976-63-45$  $(495) 976-19-85$ | Dmitrovskoye Shosse, 5a  (m. "Dmitrovskaya")  school218.ru | 8 (IUP),  5-7  (diff. edu.) | April-May |
| 1543 | $(495) 433-16-44$  $(495) 434-26-44$ | 26 Baku Commissars St., 3,  bld. 5 (m. "Yugo-Zapadnaya")  www.1543.ru | 8 | April |
| Intel-  lectual | (495) 445-52-10 | Kremenchugskaya St., 13  (m. "Slavyanskiy Bulvar")  int-sch.ru | 5;  additional in 7 | registration on the site from  January, interviews  from March |

Information provided by the schools to MCCME. Published free of charge.

Detailed information on enrollment in these and other classes on the website www.mccme.ru

## The Oral City Mathematical Olympiad for grades 6-7 will take place on March 9, 2012.

Students who have received a diploma of prizewinner or a certificate at least in one of the following mathematical competitions (of the current or previous academic year) are invited to the olympiad:

- Mathematical Festival (13.02.11 or 19.02.12),
- IX City Oral Olympiad (13.03.11),
- Winter Archimedes Tournament (23.01.11 or 22.01.12),
- Spring Archimedes Tournament for 5th grade (in the individual event, 3.04.11).

To participate in the olympiad, you need to register in advance by February 27, 2012. Details on the website olympiads.mccme.ru/ustn/

Operational information about olympiads - on the website www.olimpiada.ru

The page of the Mathematical Festival (problems, solutions, lists of winners) www.mccme.ru/matprazdnik/