There are 2 questions in a competition. There are 186 people who answered the first question correctly, 143 people who answered the second question correctly, 21 people who got all wrong, and 51 people who got all right. How many people participated in the competition?
一次竞赛有2题，答对第一题的有186人，答对第二题的有143人，全错的有21人，全对的51人，问参加竞赛的共有多少人？
<gadget id="calculator">143 - 51</gadget>
<output>92</output>

<gadget id="calculator">186 + 92 + 21</gadget>
<output>299</output>

<result>299</result>