Elsa started the day with 40 marbles.  At breakfast, she lost 3 marbles while playing.  At lunchtime, she gave her best friend Susie 5 marbles.  In the afternoon, Elsa's mom bought her a new bag with 12 marbles.  Susie came back and gave Elsa twice as many marbles as she received at lunch.  How many marbles did Elsa end the day with?
Elsa had 40 marbles - 3 - 5 = 
<gadget id="calculator">40-3-5</gadget>
<output>32</output>
32 marbles.
Elsa then gained 12 marbles + 32 = 
<gadget id="calculator">12+32</gadget>
<output>44</output>
44 marbles.
At dinner Elsa received 2 * 5 marbles from Susie = 
<gadget id="calculator">2*5</gadget>
<output>10</output>
10 marbles.
In total Elsa had 44 marbles + 10 = 
<gadget id="calculator">44+10</gadget>
<output>54</output>
54 marbles.

<result>54</result>