When the 50 students in class one of the third grade were out of school, some of them wore little yellow hats, and some didn't wear little yellow hats. When the teacher on duty checked, he found that among the 50 students, if he randomly picked out 2 people, one of them must be wearing a yellow hat. How many students in Class 1 of the third grade wear yellow hats?
三年级一班50名同学放学时，有的戴着小黄帽，有的没戴小黄帽．值日老师检查时发现，从这50名同学中，随便找出2个人，一定有1个人戴着小黄帽．三年级一班同学中，戴小黄帽的有多少人．
<gadget id="calculator">50 - 1</gadget>
<output>49</output>

<result>49</result>