A batch of books is distributed to students A, B, and C. A gets (1/5) and 5 of the total number, B gets (1/4) and 7 of the total, and C gets the rest (1/2), and the remaining books account for exactly (1/8) of the total number. How many books are there in total?
一批图书分给甲、乙、丙三位同学，甲分得总本数的(1/5)又5本，乙分得总本数的(1/4)又7本，丙分得其余本数的(1/2)，剩下图书正好占总本数的(1/8)．这批书共多少本？
<gadget id="calculator">5 + 7</gadget>
<output>12</output>

<gadget id="calculator">1 / 5</gadget>
<output>1/5 = around 0.2</output>

<gadget id="calculator">1 / 4</gadget>
<output>1/4 = around 0.25</output>

<gadget id="calculator">1 / 8</gadget>
<output>1/8 = around 0.125</output>

<gadget id="calculator">1 - (1/5) - (1/4) - (1/8) - (1/8)</gadget>
<output>3/10 = around 0.3</output>

<gadget id="calculator">12 / (3/10)</gadget>
<output>40</output>

<result>40</result>