Distribute a batch of books to the first and second grades according to the ratio of 5:3. It is known that the first grade gets 40 more books than the second grade. How many books are there in total?
把一批图书按5：3的比例分给一、二年级，已知一年级比二年级多分得40本．这批图书共有多少本？
<gadget id="calculator">5 - 3</gadget>
<output>2</output>

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

<gadget id="calculator">5 + 3</gadget>
<output>8</output>

<gadget id="calculator">20 * 8</gadget>
<output>160</output>

<result>160</result>