Grandma Zhang went to the street to sell a basket of eggs. On the first day, half of the eggs were sold and there was an extra egg. On the second day, the remaining half was sold and there was an extra egg. There are 5 eggs left. How many eggs were there in Grandma Zhang's basket?
张奶奶上街卖一篮鸡蛋，第一天卖了一半还多1个，第二天卖了剩下的一半还多1个，第三天卖了剩下的一半还多1个，篮子里还剩下5个鸡蛋，张奶奶的篮子里原来有多少个鸡蛋？
<gadget id="calculator">5 + 1</gadget>
<output>6</output>

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

<gadget id="calculator">12 + 1</gadget>
<output>13</output>

<gadget id="calculator">13 * 2</gadget>
<output>26</output>

<gadget id="calculator">26 + 1</gadget>
<output>27</output>

<gadget id="calculator">27 * 2</gadget>
<output>54</output>

<result>54</result>