Gabriel is playing 2048. In this game, squares appear with a number on it. All the numbers are positive powers of
Input Specification
A single integer,
The second line contains
Output Specification
A single integer, the biggest square can Gabriel can theoretically create.
Sample Input 1
Copy
3
2 4 2
Sample Output 1
Copy
8
Explanation for Sample Output 1
Gabriel can combine the two
Sample Input 2
Copy
5
2 2 8 16 32
Sample Output 2
Copy
32
Explanation for Sample Output 2
Although Gabriel can combine the two
Comments