2.4 In a closed bag lie apples. Three friends tried to lift the bag and guess how many fruits were inside. The first one said that, in his opinion, there were 18 apples, the second thought there were 21, and the third said 22. When the friends opened the bag, it turned out that one of them was off by 2, another by 3, and the third by 6. How many apples were in the bag? Find all possible answers.
Answer: 24 apples

Solution. Note that the first and third give even predictions, which means they make an error of one parity, while the third makes an error of the other parity. Therefore, the second one was off by 3 apples, so there are either 18 or 24 apples in the bag. Checking both options, we get the answer.