Sandboxes
I had planned to enjoy a nice breakfast and take a nap during the senior lecturer's class. However, on my way to the cafeteria, I was intercepted by the teachers of parallel G, and I quickly realized that today was going to be a tough one. They had reviewed the schedule and noticed that their students would have nothing to do after lunch. The computer lab was closed due to another inspection, the heat made sports activities impossible, and only students aged 18 and older were allowed to watch a movie. Special courses on additional sections of algebraic topology and methods of syntactic analysis were unlikely to appeal to elementary school students. How could we keep them entertained?
After some discussion, we decided to adapt to the situation by constructing a few sandboxes from the boards lying nearby. A proper sandbox requires exactly four boards and must be rectangular. Without a saw, we need to use the boards at their full length. To maximize the children's play area, the total area of the sandboxes should be as large as possible. Help us build these sandboxes!
Input
The first line contains an integer n (1 ≤ n ≤ 1000) - the number of boards. The second line contains n integers separated by spaces - the lengths of the boards. All lengths are positive and do not exceed 1000.
Output
Output a single number - the maximum total area of the sandboxes.