There are several books on Xiaofang’s bookshelf, and each time she takes out half of them and puts one back. In this way, she takes it four times in total, and there are still 4 books on the bookshelf. How many books are there on Xiaofang’s bookshelf?
小芳的书架上有若干本书，每次拿出其中的一半再放回一本，这样一共拿了四次，书架上还有4本书，小芳书架上原来有多少本书？
<gadget id="calculator">4 - 1</gadget>
<output>3</output>

<gadget id="calculator">2 * 3</gadget>
<output>6</output>

<gadget id="calculator">6 - 1</gadget>
<output>5</output>

<gadget id="calculator">2 * 5</gadget>
<output>10</output>

<gadget id="calculator">10 - 1</gadget>
<output>9</output>

<gadget id="calculator">2 * 9</gadget>
<output>18</output>

<gadget id="calculator">18 - 1</gadget>
<output>17</output>

<gadget id="calculator">2 * 17</gadget>
<output>34</output>

<result>34</result>