A, B, C. D 4 people pass the ball to each other, A starts to serve the ball, and as the first pass, after 4 passes, the ball still returns to A's hand. How many ways are there to pass the ball?
甲、乙、丙．丁4个人互相传球，由甲开始发球，并作为第一次传球，经过4次传球后，球仍回到甲手中．一共有多少种传球方式？
<gadget id="calculator">3 * 1 * 3 * 1</gadget>
<output>9</output>

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

<gadget id="calculator">9 + 12</gadget>
<output>21</output>

<result>21</result>