Little Red Riding Hood took a basket of eggs to the city to sell. The first time she sold half of all the eggs and one, the second time she sold half and one of the remaining eggs, and the third time she sold the remaining eggs Half of the egg and another one, there is still one egg left in the basket. How many eggs were there in the basket?
小红帽提了一篮鸡蛋去城里卖，第一次卖出全部鸡蛋的一半又1个，第二次又卖出剩下的鸡蛋的一半又1个，第三次又卖出剩下的鸡蛋的一半又1个，这时篮子里还剩下1个鸡蛋．篮子里原来有多少个鸡蛋？
<gadget id="calculator">1 + 1</gadget>
<output>2</output>

<gadget id="calculator">2 * 2</gadget>
<output>4</output>

<gadget id="calculator">4 + 1</gadget>
<output>5</output>

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

<gadget id="calculator">10 + 1</gadget>
<output>11</output>

<gadget id="calculator">11 * 2</gadget>
<output>22</output>

<result>22</result>