SDE Path

Average of an Array

Easy

Average of an Array

Print the integer average of an array of non-negative numbers.

Input format

The first line contains N. The second line contains N space-separated non-negative integers.

Output format

Print the average using integer division (the sum divided by N, rounded down).

Constraints

  • Values fit in a 64-bit signed integer
  • Trailing whitespace and a trailing newline are ignored by the judge

Read from stdin, write to stdout. Sample cases below show the exact format.

Sample cases

Example 1
Input
4
10 20 30 40
Expected output
25
Example 2
Input
3
1 2 4
Expected output
2