Jed collects stamp cards. Every week, he gets 6 cards. But every two weeks, he gives 2 cards to his friends. If Jed started with 20 cards, after how many weeks will he have a total of 40 cards?
In the first week, Jed has 20 + 6 = 
<gadget id="calculator">20+6</gadget>
<output>26</output>
26 cards.
In the second week, he has 26 + 6 = 
<gadget id="calculator">26+6</gadget>
<output>32</output>
32 cards.
But he is left with 32 - 2 = 
<gadget id="calculator">32-2</gadget>
<output>30</output>
30 cards on the 2nd week after giving 2 cards to his friend.
Then Jed has 30 + 6 = 
<gadget id="calculator">30+6</gadget>
<output>36</output>
36 cards on the 3rd week.
He has 36 + 6 = 
<gadget id="calculator">36+6</gadget>
<output>42</output>
42 cards on the 4th week.
After giving his friend 2 cards, he is then left with 42 - 2 = 
<gadget id="calculator">42-2</gadget>
<output>40</output>
40 cards on the 4th week.
Hence, Jed will have a total of 40 cards in 4 weeks.

<result>4</result>