Three cargo ships came to the pier. It took 8 hours to unload the first one, 4 hours to unload the second one, and 1 hour to unload the third one. The cargo could only be unloaded one by one, and the three cargo ships had to wait. In what order should the unloading be carried out in the shortest time?
码头来了三艘货船，第一艘卸完要8小时，第二艘卸完要4小时，第三艘卸完要1小时，只能一船一船地卸货，要使三艘货船的等候时间的和最少，应该按怎样的顺序卸货？
<gadget id="calculator">1 * 3</gadget>
<output>3</output>

<gadget id="calculator">4 * 2</gadget>
<output>8</output>

<gadget id="calculator">3 + 8 + 8</gadget>
<output>19</output>

<result>19</result>