James needs to get a new pair of glasses.  His frames cost $200 and the lenses cost $500.  Insurance will cover 80% of the cost of lenses and he has a $50 off coupon for frames.  How much does everything cost?
He gets 500*.8=$
<gadget id="calculator">500*.8</gadget>
<output>400</output>
400 off the cost of lenses.
That means the lenses cost 500-400=$
<gadget id="calculator">500-400</gadget>
<output>100</output>
100.
The frames cost 200-50=$
<gadget id="calculator">200-50</gadget>
<output>150</output>
150.
So he pays 100+150=$
<gadget id="calculator">100+150</gadget>
<output>250</output>
250.

<result>250</result>