There are two bags of white sugar. If 5 kg of sugar is poured into the second bag from the first bag, then the weights of the two bags are exactly equal. It is known that the second bag originally contained 22 kg of white sugar. How many kilograms of sugar did the first bag originally contain?
有两袋白糖，如果第一袋往第二袋倒5千克，那么，两袋的重量正好相等，已知第二袋原来有白糖22千克，第一袋原来有糖多少千克？
<gadget id="calculator">22 + 5</gadget>
<output>27</output>

<gadget id="calculator">27 * 2</gadget>
<output>54</output>

<gadget id="calculator">54 - 22</gadget>
<output>32</output>

<result>32</result>