signal soldier hangs three red, yellow and blue flags from top to bottom on a vertical flagpole to signal. Each time you can hang 1 side, 2 sides, 3 sides, and different orders and different positions represent different signals. How many different signals can be represented by the three flags?
某信号兵用红、黄、蓝3面旗从上到下挂在竖直的旗杆上表示信号．每一次可以任挂1面、2面、3面，并且不同的顺序、不同的位置表示不同的信号．3面旗一共可以表示出多少种不同的信号．
<gadget id="calculator">3 * 3</gadget>
<output>9</output>

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

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

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

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

<gadget id="calculator">9 + 18 + 6</gadget>
<output>33</output>

<result>33</result>