Question 844041
Let {{{ c }}} = the initial number of chocolates
-----------------
The 1st thief takes {{{ c/2 + 1/2 }}}, so
there are {{{ c/2 - 1/2 }}} left
--------------------------
The 2nd thief takes {{{  c/4 - 1/4 + 1/2 }}}
{{{ c/4 + 1/4 }}}
There is {{{ c/2 - 1/2 - c/4 - 1/4 }}} left
{{{ c/4 - 3/4 }}} left
---------------------------
The 3rd thief takes {{{ c/8 - 3/8 + 1/2 }}}
{{{ c/8 + 1/8 }}}
There is {{{ c/4 - 3/4 - c/8 - 1/8 }}} left
{{{ c/8 - 7/8 }}} left
---------------------------
The 4th thief takes {{{ c/16 - 7/16 + 1/2 }}}
{{{ c/16 + 1/16 }}}
There is {{{ c/8 - 7/8 - c/16 - 1/16 }}} left
{{{ c/16 - 15/16 }}} left
----------------------------
The 5th thief takes {{{ c/32 - 15/32 + 1/2 }}}
{{{ c/32 + 1/32 }}}
There is {{{ c/16 - 15/16 - c/32 - 1/32 }}} left
{{{ c/32 - 31/32 }}} left
-----------------------------
given:
{{{ c/32 - 31/32 = 3 }}}
{{{ c - 31 = 3*32 }}}
{{{ c = 31 + 96 }}}
{{{ c = 127 }}}
------------------------------
There were 127 chocolates initially
check answer:
--------------------------------
1st thief takes {{{ 127/2 + 1/2 = 64 }}}
There are {{{ 127 - 64 = 63 }}} left
--------------------------------
2nd thief takes {{{ 63/2 + 1/2 = 32 }}}
There are {{{ 63 - 32 = 31 }}} left
--------------------------------
3rd thief takes {{{ 31/2 + 1/2 = 16 }}}
There are {{{ 31 - 16 = 15 }}} left
--------------------------------
4th thief takes {{{ 15/2 + 1/2 = 8 }}}
There are {{{ 15 - 8 = 7 }}} left
--------------------------------
5th thief takes {{{ 7/2 + 1/2 = 4 }}}
There are {{{ 7 - 4 = 3 }}} left
OK