Q. Doing the Container Shuffle
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output
Examples
Input
5
4 2 5 3 1
Output
7.000
Input
6
1 2 3 4 5 6
Output
13.500