Mr. Zhang went to buy a batch of pens and ballpoint pens as prizes. If he bought 10 pens, he would have 8 yuan left. If he bought 30 ballpoint pens, he would be 2 yuan short. It is known that each fountain pen is 3.1 yuan more expensive than each ballpoint pen. Ask: How much does the teacher have in total?
张老师去买一批钢笔和圆珠笔做奖品，如果买钢笔10枝，则还余8元，如果买圆珠笔30枝，则还差2元．已知每支钢笔比每支圆珠笔贵3.1元，问：老师共有多少钱．
<gadget id="calculator">10 * 3.1</gadget>
<output>31</output>

<gadget id="calculator">2 + 31 + 8</gadget>
<output>41</output>

<gadget id="calculator">30 - 10</gadget>
<output>20</output>

<gadget id="calculator">41 / 20</gadget>
<output>41/20 = around 2.05</output>

<gadget id="calculator">(41/20) * 30</gadget>
<output>123/2 = around 61.5</output>

<gadget id="calculator">(123/2) - 2</gadget>
<output>119/2 = around 59.5</output>

<result>119/2 = around 59.5</result>