Ilya is a very good-natured lion. He likes maths. Of all mathematical objects, his favourite one is matrices. Now he's faced a complicated matrix problem he needs to solve.

He's got a square 2<sup class="upper-index">*n*</sup> × 2<sup class="upper-index">*n*</sup>-sized matrix and 4<sup class="upper-index">*n*</sup> integers. You need to arrange all these numbers in the matrix (put each number in a single individual cell) so that the beauty of the resulting matrix with numbers is maximum.

The beauty of a 2<sup class="upper-index">*n*</sup> × 2<sup class="upper-index">*n*</sup>-sized matrix is an integer, obtained by the following algorithm:
 1.  Find the maximum element in the matrix. Let's denote it as *m*. 1.  If *n* = 0, then the beauty of the matrix equals *m*. Otherwise, a matrix can be split into 4 non-intersecting 2<sup class="upper-index">*n* - 1</sup> × 2<sup class="upper-index">*n* - 1</sup>-sized submatrices, then the beauty of the matrix equals the sum of number *m* and other four beauties of the described submatrices. 
As you can see, the algorithm is recursive.

Help Ilya, solve the problem and print the resulting maximum beauty of the matrix.
The first line contains integer 4<sup class="upper-index">*n*</sup> (1 ≤ 4<sup class="upper-index">*n*</sup> ≤ 2·10<sup class="upper-index">6</sup>). The next line contains 4<sup class="upper-index">*n*</sup> integers *a*<sub class="lower-index">*i*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>) — the numbers you need to arrange in the 2<sup class="upper-index">*n*</sup> × 2<sup class="upper-index">*n*</sup>-sized matrix.
print("_RANDOM_GUESS_1689255068.299534")# 1689255068.299584