There is a batch of books in the bookstore. On the first day, more than half of the total number of books were bought, and on the second day, the remaining half of the book was sold out, more than 5 books, leaving 40 books. How many books are there in total?
书店里有一批图书，第一天买出总数的一半多3本，第二天买出剩下的一半多5本，还剩下40本．这批图书原来一共有多少本．
<gadget id="calculator">40 + 5</gadget>
<output>45</output>

<gadget id="calculator">45 * 2</gadget>
<output>90</output>

<gadget id="calculator">90 + 3</gadget>
<output>93</output>

<gadget id="calculator">93 * 2</gadget>
<output>186</output>

<result>186</result>