Janet has 24 dresses.  Half of them have pockets.  Of those, a third have 2 pockets and the rest have 3 pockets.  How many total pockets do her dresses have?
She has 24/2=
<gadget id="calculator">24/2</gadget>
<output>12</output>
12 dresses with pockets.
Of those 12/3=4 have 2 pockets.
So 12-4=
<gadget id="calculator">12-4</gadget>
<output>8</output>
8 have three pockets.
So the dresses with 2 pockets have 2*4=
<gadget id="calculator">2*4</gadget>
<output>8</output>
8 pockets.
The other dresses contribute 8*3=
<gadget id="calculator">8*3</gadget>
<output>24</output>
24 pockets.
So she has a total of 8+24=
<gadget id="calculator">8+24</gadget>
<output>32</output>
32 pockets.

<result>32</result>