For a barrel of oil, half of it is used for the first time and more than 5 kg, the remaining half is used for the second time and the remaining half is 3 kg less, and 12 kg is used for the third time, leaving 8 kg. How many kilograms is this barrel of oil originally?
一桶油，第一次用去它的一半多5千克，第二次用去余下的一半少3千克，第三次用去12千克，还剩8千克．这桶油原来有多少千克？
<gadget id="calculator">8 - 3</gadget>
<output>5</output>

<gadget id="calculator">12 + 5</gadget>
<output>17</output>

<gadget id="calculator">17 * 2</gadget>
<output>34</output>

<gadget id="calculator">34 + 5</gadget>
<output>39</output>

<gadget id="calculator">39 * 2</gadget>
<output>78</output>

<result>78</result>