5.1. (14 points) A guard has detained a stranger and wants to drive him away. But the person caught said that he had made a bet with his friends for 100 coins that the guard would not drive him away (if the guard does, he has to pay his friends 100 coins, otherwise they pay him), and, deciding to bribe the guard, offered him to name a sum. What is the largest number of coins the guard can ask for so that the stranger, guided solely by his own profit, would definitely pay the guard?
Answer: 199.

Solution. If the guard asks for 199 coins, then by agreeing to give him this amount, the outsider will win the dispute and receive 100 coins. In total, he will lose 99 coins. If the outsider refuses, he will lose the dispute and lose 100 coins, which is less favorable (by 1 coin) for the one caught. If the guard demands 200, the outsider might refuse, as there is no difference in profit. If the guard demands more, it is more profitable for the outsider to refuse. The guard can ask for less, but the problem requires finding the largest amount. Thus, the answer is 199 coins.