Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register
Language:
Fence
Time Limit: 1000MSMemory Limit: 10000K
Total Submissions: 936Accepted: 218

Description

Workers are going to enclose a new working region with a fence. For their convenience the enclosed area has to be as large as possible. They have N rectangular blocks to build the fence. The length of the i-th block is Li meters. All blocks have the same height of 1 meter. The workers are not allowed to break blocks into parts. All blocks must be used to build the fence.

Input

The first line of the input file contains one integer N (3 <= N <= 100).
The following N lines describe fence blocks. Each block is represented by its length in meters (integer number, 1 <= Li <= 100).

Output

Write to the output file one non-negative number S - maximal possible area of the working region (in square meters). S must be written with at least two digits after the decimal point. If it is not possible to construct the fence from the specified blocks, write 0.00.

Sample Input

4
10
5
5
4

Sample Output

28.00

Source

Northeastern Europe 2001, Northern Subregion 2001(URAL 1159)

[Submit]   [Go Back]   [Status]   [Discuss]

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator