There are three classes A, B, and C in the third grade of Hongqi Primary School, with a total of 162 students. If two students are transferred from Class A to Class B, the number of students in Class A and Class B will be the same. If at this time 3 more people are transferred from Class C to Class B, the number of people in Class B and Class C will be the same. May I ask: How many people were there in Class A?
红旗小学三年级有甲、乙、丙三个班，一共有学生162人，如果从甲班转出2个人到乙班，则甲、乙两班人数相同．如果这时再从丙班转出3个人到乙班，则乙、丙两班人数相同．请问：甲班原来有多少人？
<gadget id="calculator">2 * 2</gadget>
<output>4</output>

<gadget id="calculator">162 - 4</gadget>
<output>158</output>

<gadget id="calculator">4 + 158</gadget>
<output>162</output>

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

<gadget id="calculator">162 / 3</gadget>
<output>54</output>

<result>54</result>