4362: 大学入学年份

内存限制:256 MB 时间限制:1 S
题面:传统 评测方式:文本比较 上传者:
提交:25 通过:7

题目描述

      柏林有计算机科学学院。在社交网络“TheContact!”对于该学院的每门课程,都有一个特殊的小组,其名称等于该大学相应课程的学生入学年份。每个学生都加入自己课程的小组,并加入所有学生的大学入学年份与该学生大学入学年份相差不超过x的小组,其中x为一些非负整数。值x未给出,但可以根据可用数据唯一确定。请注意,学生不参加其他小组。你会看到学生Igor加入的小组列表。根据这些信息,你需要确定伊戈尔的大学入学年份。

There is the faculty of Computer Science in Berland. In the social net "TheContact!" for each course of this faculty there is the special group whose name equals the year of university entrance of corresponding course of students at the university.
Each of students joins the group of his course and joins all groups for which the year of student's university entrance differs by no more than x from the year of university entrance of this student, where x − some non-negative integer. A value x is not given, but it can be uniquely determined from the available data. Note that students don't join other groups.
You are given the list of groups which the student Igor joined. According to this information you need to determine the year of Igor's university entrance.
Input
The first line contains the positive odd integer n (1≤n≤5) − the number of groups which Igor joined.
The next line contains n distinct integers a1,a2,...,an (2010≤ai≤2100) − years of student's university entrance for each group in which Igor is the member.
It is guaranteed that the input data is correct and the answer always exists. Groups are given randomly.
Output
Print the year of Igor's university entrance.
Examples
Input
3
2014 2016 2015
Output
2015
Input
1
2050
Output
2050
Note
In the first test the value x=1. Igor entered the university in 2015. So he joined groups members of which are students who entered the university in 2014, 2015 and 2016.
In the second test the value x=0. Igor entered only the group which corresponds to the year of his university entrance.

输入格式

第一行包含正奇整数n(1≤n≤5) 为Igor加入的组数。

下一行包含n个不同的整数a1,a2,…,an(2010≤人工智能≤2100) − 伊戈尔所在的每个小组的学生入学年限。

保证输入数据正确且答案始终存在。随机分组。

输出格式

输出

打印伊戈尔大学入学的年份。

 

示例

输入

3.

2014 2016 2015

 

输出

2015

 

输入

1.

2050

 

输出

2050

 

样例解释

在第一次测试中,值x=1。Igor于2015年进入大学。因此,他加入了一些小组,这些小组的成员是2014年、2015年和2016年进入大学的学生。

 

在第二次测试中,值x=0。伊戈尔只进入了与大学入学年份相对应的组。

输入样例 复制

3
2014 2016 2015

输出样例 复制

2015