There are some apples in a basket, and a child takes apples out of the basket. The method of taking them is as follows: every time he takes out half of the total number of apples in the basket, and then puts one back. In this way, after the child took a total of 597 times, there were still 2 apples in the basket. So how many apples are in the basket at the beginning.
一个篮子里放着一些苹果，有一个小朋友从篮子里往外拿苹果，拿的方法有：每次都拿出篮子里苹果总数的一半，然后再放回1个．就这样这个小朋友一共拿了597次之后，这时篮子里还有2个苹果．那么刚开始时篮子里有多少个苹果．
<gadget id="calculator">2 - 1</gadget>
<output>1</output>

<gadget id="calculator">1 / 2</gadget>
<output>1/2 = around 0.5</output>

<gadget id="calculator">1 / (1/2)</gadget>
<output>2</output>

<result>2</result>