There is a very large room that has 4 tables, 1 sofa and 2 chairs that have 4 legs each.  There are also 3 tables with 3 legs each, 1 table with 1 leg, and 1 rocking chair with 2 legs.  How many legs are there in the room?
There are 4 tables, 1 sofa and 2 chairs that have 4 legs each so 4+1+2 =
<gadget id="calculator">4+1+2</gadget>
<output>7</output>
7 pieces of furniture.
These 7 pieces have 4 legs each so they have 7*4 = 
<gadget id="calculator">7*4</gadget>
<output>28</output>
28 legs.
There are 3 tables with 3 legs each so they have 3*3 = 
<gadget id="calculator">3*3</gadget>
<output>9</output>
9 legs.
We have 28 legs and 9 legs as well a 1 leg on a table and 2 on a rocking chair for a total of 28+9+1+2 = 
<gadget id="calculator">28+9+1+2</gadget>
<output>40</output>
40 legs.

<result>40</result>