Xiaoli bought a copy of "Fairy Tale King" with 4 yuan, and bought a copy of "Children's Era" with half of the remaining money, and used half of the remaining money for the second time plus 1 yuan to buy a pen. There is 4 yuan left, how much is Xiaoli originally?
小丽用4元买了一本《童话大王》，又用剩下的钱的一半买了一本《儿童时代》，买钢笔又用去第二次剩下的钱的一半多1元，最后还剩4元，小丽原有多少元．
<gadget id="calculator">4 + 1</gadget>
<output>5</output>

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

<gadget id="calculator">20 + 4</gadget>
<output>24</output>

<result>24</result>