Example 2 A maximum of two signal flags can be hung on the flagpole. There are red, blue and yellow signal flags on each side. If a signal flag is used to indicate a signal, how many different signals can be displayed at most?
例2旗杆上最多可以挂两面信号旗，现有红色、蓝色和黄色的信号旗各一面，如果用挂信号旗表示信号，最多能表示出多少种不同的信号？
<gadget id="calculator">3 + 6</gadget>
<output>9</output>

<result>9</result>