Circles in Ellipse

The following picture shows the best way to have 30 circles with the largest possible sum of radii packed inside an ellipse with perimeter 2π ∗ A. Given A, you will compute 30 circles. Each color represent a circle of different size. R, the sum of all radii over the ∑ Input A number of of inputs, each line with an integer 0 ≤ A ≤ 1000000000. Output Output the answer rounded to an integer. Sample Input 1 10 100 Sample Output 5 50 503