In Sam's collection, there are ten more black pens than blue pens and twice as many blue pens as pencils. There are also eight pencils and two fewer red pens than pencils. How many pens in all are there in Sam's collection?
8 x 2 = 
<gadget id="calculator">8*2</gadget>
<output>16</output>
16 are blue pens.
16 + 10 = 
<gadget id="calculator">16+10</gadget>
<output>26</output>
26 are black pens.
8 - 2 = 
<gadget id="calculator">8-2</gadget>
<output>6</output>
6 are red pens.
Therefore, there are 16 + 26 + 6 = 
<gadget id="calculator">16+26+6</gadget>
<output>48</output>
48 pens in all in Sam's collection.

<result>48</result>