Dingguagua Training School selected a group of outstanding students to participate in the composition competition and mathematics competition. As a result, 7 students won both competitions, and 12 students did not win both competitions. It is known that there are 12 winners in the composition competition and 28 winners in the mathematics competition, so how many are these outstanding students?
顶呱呱培训学校选出一批优秀的学生参加作文比赛和数学比赛，结果7人两项比赛都获奖了，有12人两项比赛都没有获奖．已知作文比赛获奖的有12人，数学比赛获奖的有28人，那么这批优秀的学生一共有多少人．
<gadget id="calculator">28 - 7</gadget>
<output>21</output>

<gadget id="calculator">12 + 21 + 12</gadget>
<output>45</output>

<result>45</result>