8 classes of grade 7 in a certain school have a football friendly match, using the scoring system of 3 points for a win, 1 point for a tie, and 0 points for a loss. After a certain class played 1 game with other 7 teams and accumulated 17 points with an unbeaten record, how many games did this class win in total?
某学校七年级8个班进行足球友谊赛，采用胜一场得3分，平一场得1分，负一场得0分的记分制．某班与其他7个队各赛1场后，以不败的战绩积17分，那么该班共胜了几场比赛？
<gadget id="calculator">3 * 7</gadget>
<output>21</output>

<gadget id="calculator">21 - 17</gadget>
<output>4</output>

<gadget id="calculator">4 - 2</gadget>
<output>2</output>

<gadget id="calculator">4 / 2</gadget>
<output>2</output>

<gadget id="calculator">7 - 2</gadget>
<output>5</output>

<result>5</result>