A boat carrying 20 sheep, 10 cows and 14 dogs capsized.  3 of the sheep drowned.  Twice as many cows drowned as did sheep.  All of the dogs made it to shore.  How many total animals made it to the shore?
The boat had 20 - 3 = 
<gadget id="calculator">20-3</gadget>
<output>17</output>
17 sheep make it to shore.
3 sheep drowned, so 2 * 3 = 
<gadget id="calculator">2*3</gadget>
<output>6</output>
6 cows drowned.
10 cows on the boat - 6 drowned = 
<gadget id="calculator">10-6</gadget>
<output>4</output>
4 cows made it to the shore.
17 sheep + 4 cows + 14 dogs = 
<gadget id="calculator">17+4+14</gadget>
<output>35</output>
35 animals made it to shore.

<result>35</result>