The students in class 51 went to collect specimens. There were 27 people who collected animal specimens, 21 people who collected plant specimens, and 8 people who collected both kinds of specimens. How many students are there in total in the class?
五1班同学去采集标本，采集动物标本的有27人，采集植物标本的有21人，两种标本都采集的有8人．全班共有学生多少人？
<gadget id="calculator">21 - 8</gadget>
<output>13</output>

<gadget id="calculator">27 + 13</gadget>
<output>40</output>

<result>40</result>