Chen Xiaoming used half of the money he brought to buy a pen, and another 2 yuan to buy a notebook. At this time, there was 18 yuan left. How much did Chen Xiaoming bring with him?
陈小明买一支钢笔用去所带钱的一半，买一本笔记本又用去2元，这时还剩18元，陈小明原来带了多少元．
<gadget id="calculator">18 + 2</gadget>
<output>20</output>

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

<result>40</result>