The school purchased a batch of new books and distributed them to the third, fourth, and fifth grades according to the ratio of 3:4:5. The fifth grade received 40 books. How many books are there in total?
学校购进一批新图书，按3：4：5的比例分给三、四、五年级，五年级分得40本，这批图书共多少本？
<gadget id="calculator">3 + 4 + 5</gadget>
<output>12</output>

<gadget id="calculator">5 / 12</gadget>
<output>5/12 = around 0.416667</output>

<gadget id="calculator">40 / (5/12)</gadget>
<output>96</output>

<result>96</result>