The school sports room bought some footballs and basketballs. Xiaoqiang counted the number of footballs and found that the number of footballs was 3 times that of basketballs and 4 more. Counting again, he found that the number of footballs was 2 less than 4 times of basketballs. How many footballs did you buy in total?
学校体育室买来一些足球和篮球，小强数了一数，足球的个数是篮球的3倍多4个；再数一遍，发现足球的个数还比篮球的4倍少2个．足球一共买了多少个．
<gadget id="calculator">4 + 2</gadget>
<output>6</output>

<gadget id="calculator">6 * 3</gadget>
<output>18</output>

<gadget id="calculator">18 + 4</gadget>
<output>22</output>

<result>22</result>