Mary has 400 sheep on her farm. She gave a quarter of her sheep to her sister, and half of the remaining sheep to her brother. How many sheep remain with Mary?
Mary gives 1/4 * 400 = 
<gadget id="calculator">400*1/4</gadget>
<output>100</output>
100 sheep to her sister.
She now has 400 - 100 = 
<gadget id="calculator">400-100</gadget>
<output>300</output>
300 sheep remaining.
She then gives 1/2 * 300 = 
<gadget id="calculator">300/2</gadget>
<output>150</output>
150 sheep to her brother.
So 300 - 150 = 
<gadget id="calculator">300-150</gadget>
<output>150</output>
150 sheep remain.

<result>150</result>