Problem 5. A monkey becomes happy when it eats three different fruits. What is the maximum number of monkeys that can be made happy with 20 pears, 30 bananas, 40 peaches, and 50 tangerines? Justify your answer. $[8$ points] (A.V. Shapovalov)
Answer: 45.

Solution. Let's set the tangerines aside for now. There are $20+30+40=90$ fruits left. Since we feed the monkeys no more than one tangerine each, each monkey will eat at least two of these 90 fruits. Therefore, there can be no more than $90: 2=45$ monkeys. Let's show how 45 monkeys can be made happy:

5 monkeys eat: a pear, a banana, a tangerine;

15 monkeys eat: a pear, a peach, a tangerine;

25 monkeys eat: a peach, a banana, a tangerine.

In total, 45 happy monkeys - and there are still five unused tangerines left!