Baiyunshan Primary School has 38 students transferred in this semester and 24 students transferred out. Now there are 845 students in total. How many students did Baiyunshan Primary School have in the last semester?
白云山小学本学期转入38人，转出24人，现在一共有学生845人．白云山小学上学期有学生多少人？
<gadget id="calculator">24 - 38</gadget>
<output>-14</output>

<gadget id="calculator">845 + (-14)</gadget>
<output>831</output>

<result>831</result>