There are more than 40 students participating in a large-scale performance. If every 7 people stand in a circle, there are 3 students left; if every 8 people stand in a circle, there are 5 students left. How many people participated in this performance?
参加一次大型演出活动的有四十几个同学，如果每7人站一圈，还剩3人；如果每8人站一圈，还剩5人．参加本次演出的一共有多少人？
<gadget id="calculator">42 + 3</gadget>
<output>45</output>

<result>45</result>