Caroline has 40 pairs of socks. She loses 4 pairs of socks at the laundromat. Of the remaining pairs of socks, she donates two-thirds to the thrift store. Then she purchases 10 new pairs of socks, and she receives 3 new pairs of socks as a gift from her dad. How many pairs of socks does Caroline have in total?
After losing some socks, Caroline has 40 - 4 = 
<gadget id="calculator">40-4</gadget>
<output>36</output>
36 pairs of socks.
Caroline donates 36 * (2/3) = 
<gadget id="calculator">36*(2/3)</gadget>
<output>24</output>
24 pairs of socks to the thrift store.
After donating some socks, Caroline has 36 - 24 = 
<gadget id="calculator">36-24</gadget>
<output>12</output>
12 pairs of socks remaining.
After getting new socks, Caroline has 12 + 10 + 3 = 
<gadget id="calculator">12+10+3</gadget>
<output>25</output>
25 pairs of socks.

<result>25</result>