Under construction

Still being built. Things may change

Adjusted Average

Interview

Time limit2sMemory limit128 MB

Summary
Given N exam scores, rescale each by dividing by the maximum score and multiplying by 100, then output the average of the rescaled scores.
Level

Easy2 of 10

Topics
Array, Math, Implementation
Solved
No attempts yet

Problem

Sejun is unhappy with his final exam scores and wants to recalculate them by the following rule. First, choose the maximum current score and call it M. Then replace each score x with x / M * 100.

For example, if the highest score is 70 and the math score is 50, the math score becomes 50 / 70 * 100, or 71.43.

Write a program that computes the new average after every score is recalculated this way.

Input

The first line contains the number of subjects N. N is at most 1000.

The second line contains N current scores separated by spaces. Each score is a nonnegative integer at most 100, and at least one score is greater than 0.

Output

Print the new average on the first line. An answer is accepted if its absolute or relative error from the true answer is at most 10^-2.

Examples8

  1. Example 1

    Input
    3
    40 80 60
    
    Expected output
    75.0
    
  2. Example 2

    Input
    3
    10 20 30
    
    Expected output
    66.666667
    
  3. Example 3

    Input
    4
    1 100 100 100
    
    Expected output
    75.25
    
  4. Example 4

    Input
    5
    1 2 4 8 16
    
    Expected output
    38.75
    
  5. Example 5

    Input
    2
    3 10
    
    Expected output
    65.0
    
  6. Example 6

    Input
    4
    10 20 0 100
    
    Expected output
    32.5
    
  7. Example 7

    Input
    1
    50
    
    Expected output
    100.0
    
  8. Example 8

    Input
    9
    10 20 30 40 50 60 70 80 90
    
    Expected output
    55.55555555555556