There are 4 classes in the fourth grade of Yucai Primary School, each class has some students participating in the "Hope Cup" competition, not counting Class A, and the total number of participants in the other three classes is 31, not counting Class D, and the remaining three classes participating The total number of students is 38. It is known that the total number of participants in Classes A and D is the same as that of Classes B and C. How many people in the fourth grade will participate in the "Hope Cup" competition?
育才小学四年级有4个班，每个班都有一部分同学参加"希望杯"赛，不算甲班，其余三个班的参赛总数是31人，不算丁班，其余三个班的参赛总人数是38人，已知甲、丁两班和乙、丙两班的参赛总人数相同，则四年级共有多少人参加"希望杯"赛．
<gadget id="calculator">38 - 7 - 7</gadget>
<output>24</output>

<gadget id="calculator">1 + 2</gadget>
<output>3</output>

<gadget id="calculator">24 / 3</gadget>
<output>8</output>

<gadget id="calculator">8 + 7 + 8</gadget>
<output>23</output>

<gadget id="calculator">23 * 2</gadget>
<output>46</output>

<result>46</result>