4. The Tale of the Greedy Bear Cubs. Two bear cubs found a large round piece of cheese. They wanted to divide it equally, but they couldn't—each was afraid the other would get more. Suddenly, out of nowhere, a fox approached them.

- Let me divide the cheese equally for you.
- That's great! - the bear cubs rejoiced. - Divide it! The fox took the cheese and broke it into two pieces, but one piece was larger than the other. The bear cubs cried out:
- This one is bigger! The fox calmed them down:
- I'll fix it right away. She bit off a piece from the larger part, equal to the smaller part. Now the other piece became larger.
- It's still uneven! - the bear cubs worried.
- Now, now, - said the fox. - I know what I'm doing! And she bit off another piece from the larger part, equal to the smaller part.

The fox continued to divide the cheese this way until she was full. In total, she bit off three times from each part in the same manner—biting off a piece from one part equal to the other part. The bear cubs only moved their black noses back and forth, from the larger piece to the smaller one, and from the smaller one to the larger one.

Finally, the pieces were equal, but the bear cubs were left with almost no cheese: two small pieces of 20 grams each.

- Well, - said the fox, - even if it's a little, at least it's equal! Enjoy your meal, bear cubs! - And, wagging her tail, the trickster ran away. Determine the weight of the cheese head found by the bear cubs.
Answer: 680g. Solution. We will analyze from the end. At the last moment, the bear cubs had pieces of 20g each, which means before that, they had pieces of 40g and 20g. We will denote this as $(20,20) \leftarrow(40,20)$. Then the complete sequence of actions will look like this:

$(20,20) \leftarrow(40,20) \leftarrow(40,60) \leftarrow(100,60) \leftarrow(100,160) \leftarrow(260,160) \leftarrow$ $(260,420)$. Therefore, the weight of the head of cabbage that the bear cubs found was equal to $260+420=680$.