Teacher Wang from Class 61 asked three questions in a math test. As a result, 39 people got the first question right, 42 people got the second question right, and 28 people got the third question right. There were 33 people who got the first and second questions right, 22 people who got the first and third questions right, 21 people who got the second and third questions right, 17 people who were all right, and none who were all wrong. How many people are there in the class?
六一班的王老师在一次数学测验中共出了三道题，结果做对第一题的有39人，做对第二题的有42人，做对第三题的有28人，同时做对第一、二题的有33人，做对第一、三题的有22人，做对第二、三题的有21人，全对的有17人，没有全错的．全班有多少人？
<gadget id="calculator">39 + 42 + 28</gadget>
<output>109</output>

<gadget id="calculator">33 - 17</gadget>
<output>16</output>

<gadget id="calculator">22 - 17</gadget>
<output>5</output>

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

<gadget id="calculator">16 + 5 + 4</gadget>
<output>25</output>

<gadget id="calculator">17 * 2</gadget>
<output>34</output>

<gadget id="calculator">109 - 25 - 34</gadget>
<output>50</output>

<result>50</result>