There are some pears in the basket. Xiaogang took half of the total and one more. Xiao Ming took the remaining half and one more. Xiaojun took it away, and Xiaoming took it away, leaving more than half of it. At this time, there is 1 pear left in the basket. Question: How many pears are there in the basket?
篮子里有一些梨．小刚取走总数的一半多一个．小明取走余下的一半多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>