40 students form a circle, each numbered 1-40 in turn. The teacher randomly selects a student, and counts from 1 to 3 clockwise from this student, and all students who report 1 and 2 are listed. Continue to go on until the last student is left. The number of the last remaining student is 37, so what number did the teacher choose at the beginning.
40个同学围成一个圈，每个人依次编上号码1～40．老师随意点一位同学，从这位同学开始顺时针1至3报数，凡是报1和2的同学都出列．不断的进行下去，直到剩下最后一位同学．最后剩下的这位同学号码为37，那么，老师一开始点中的是多少号同学．
<gadget id="calculator">1 + 4</gadget>
<output>5</output>

<result>5</result>