for more information, see: https://en.wikipedia.org/wiki/Bankruptcy_problem or the chapter 11.2 of the Alive's game theory book