Problem 5. Petya has 50 balls of three colors: red, blue, and green. It is known that among any 34 balls, there is at least one red; among any 35, there is at least one blue; among any 36, there is at least one green. How many green balls can Petya have?
Answer: Petya can have 15, 16, or 17 green balls.

Solution. Consider the first condition. From the fact that among any 34 balls there is at least one red ball, it follows that there are no more than 33 non-red balls. From this, we get that there are no fewer than $50-33=17$ red balls. Similarly, there are no fewer than $50-34=16$ blue balls, and no fewer than $50-35=15$ green balls. But $17+16+15=48$, so the remaining 2 balls can be of any color. Therefore, the number of green balls can be any number from 15 to 17.