John decides to get a loan by mortgaging his home.  His house is worth $250,000.  He gets a loan worth 40% of that.  He uses 60% of that to pay off his debts.  How much money did he have leftover after paying debt?
His loan is worth 250,000*.4=$
<gadget id="calculator">250000*.4</gadget>
<output>100_000</output>
100,000.
That means he uses 100,000*.6=$
<gadget id="calculator">100000*.6</gadget>
<output>60_000</output>
60,000 to pay off debts.
So he has 100,000-60,000=$
<gadget id="calculator">100000-60000</gadget>
<output>40_000</output>
40,000 leftover.

<result>40_000</result>