The class held a party, and everyone formed an oval shape. On the left of the boy Xiao Ming, there were 2 female students, a male student, 4 female students, a male student, 6 female students, and a male student. Going on like this, the arrangement pattern on Xiao Ming's right is the same as that on his left, until there are 8 female students between the two male students. Then, how many students are there in Xiao Ming's class?
班级召开联欢会，大家围成一个椭圆形，在男孩小明的左边依次是2名女同学，一名男同学，又4名女同学，一名男同学，6名女同学，一名男同学，如此下去，在小明的右边排列规律与他的左边相同，直至两名男同学之间有8名女同学，那么，小明班级共有学生多少名．
<gadget id="calculator">1 + 2 + 1 + 4 + 1 + 6 + 1 + 8 + 1 + 6 + 1 + 4 + 1 + 2</gadget>
<output>39</output>

<result>39</result>