After your successful efforts in timing the alien invasion, Flatland has emerged victorious! of the alien ships have been salvaged and the Flatlanders want to use them to build not one, not two, but three tall statues commemorating this independence day!
Each of the alien ships has it’s own length. The Flatlanders line these ships up on end to form three stacks. In order to create a balanced visual piece, they would like to minimize the length of the longest statue. Can you help them determine the minimum height of the longest statue?
Each test case begins with an integer . The next line contains integers , representing the lengths of the ships.
For each test case, output one integer : the minimum length of the longest statue.
4 1 2 3 2
6 3 4 5 4 9 8