It may seem strange, but mushrooms like soda. Moreover, Michael enjoys experimenting with it. Each kind of soda has its own level of sweetness. Michael has containers with soda of different sweetness levels. If Michael mixes two containers with levels and , they are replaced by a new container with a sweetness level of 2 \cdot \min(x, y).
Help Michael obtain soda with the highest possible level of sweetness.
The first line contains the number of containers (1 \leq n \leq 10^6). The second line contains integers: the sweetness levels x_i (-10^9 \leq x_i \leq 10^9).
Print the highest possible level of sweetness that can be obtained by mixing some of the available sodas.
مثال 1
مثال 16