{"raw_statement":[{"iden":"statement","content":"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.\n\nEach 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.\n\nYou 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."},{"iden":"input","content":"The first line contains the positive odd integer _n_ (1 ≤ _n_ ≤ 5) — the number of groups which Igor joined.\n\nThe next line contains _n_ distinct integers _a_1, _a_2, ..., _a__n_ (2010 ≤ _a__i_ ≤ 2100) — years of student's university entrance for each group in which Igor is the member.\n\nIt is guaranteed that the input data is correct and the answer always exists. Groups are given randomly."},{"iden":"output","content":"Print the year of Igor's university entrance."},{"iden":"examples","content":"Input\n\n3\n2014 2016 2015\n\nOutput\n\n2015\n\nInput\n\n1\n2050\n\nOutput\n\n2050"},{"iden":"note","content":"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.\n\nIn the second test the value _x_ = 0. Igor entered only the group which corresponds to the year of his university entrance."}],"translated_statement":[{"iden":"statement","content":"在贝瑞兰大学有一个计算机科学学院。在社交网络 \"TheContact!\" 中，该学院每个年级都有一个专属群组，群组名称等于该年级学生入学的年份。\n\n每个学生都会加入自己年级的群组，并加入所有入学年份与自己入学年份相差不超过 #cf_span[x] 的群组，其中 #cf_span[x] 是某个非负整数。虽然 #cf_span[x] 的值未直接给出，但可以根据现有数据唯一确定。注意，学生不会加入其他群组。\n\n给你一个列表，列出学生 Igor 加入的所有群组。根据这些信息，你需要确定 Igor 的大学入学年份。\n\n第一行包含一个正奇数 #cf_span[n]（#cf_span[1 ≤ n ≤ 5]）——Igor 加入的群组数量。\n\n第二行包含 #cf_span[n] 个互不相同的整数 #cf_span[a1, a2, ..., an]（#cf_span[2010 ≤ ai ≤ 2100]）——Igor 所在每个群组对应的学生入学年份。\n\n保证输入数据正确，且答案一定存在。群组的给出顺序是随机的。\n\n请输出 Igor 的大学入学年份。\n\n在第一个测试用例中，#cf_span[x = 1]。Igor 于 2015 年入学，因此他加入了入学年份为 2014、2015 和 2016 的群组。\n\n在第二个测试用例中，#cf_span[x = 0]。Igor 只加入了与他入学年份对应的群组。"},{"iden":"input","content":"第一行包含一个正奇数 #cf_span[n]（#cf_span[1 ≤ n ≤ 5]）——Igor 加入的群组数量。第二行包含 #cf_span[n] 个互不相同的整数 #cf_span[a1, a2, ..., an]（#cf_span[2010 ≤ ai ≤ 2100]）——Igor 所在每个群组对应的学生入学年份。保证输入数据正确，且答案一定存在。群组的给出顺序是随机的。"},{"iden":"output","content":"请输出 Igor 的大学入学年份。"},{"iden":"examples","content":"输入\n3\n2014 2016 2015\n输出\n2015\n输入\n1\n2050\n输出\n2050"},{"iden":"note","content":"在第一个测试用例中，#cf_span[x = 1]。Igor 于 2015 年入学，因此他加入了入学年份为 2014、2015 和 2016 的群组。在第二个测试用例中，#cf_span[x = 0]。Igor 只加入了与他入学年份对应的群组。"}],"sample_group":[],"show_order":[],"formal_statement":"Let $ n \\in \\mathbb{Z}^+ $ be an odd integer with $ 1 \\leq n \\leq 5 $, and let $ A = \\{a_1, a_2, \\dots, a_n\\} $ be a set of distinct integers with $ 2010 \\leq a_i \\leq 2100 $, representing the years of university entrance for the groups Igor joined.\n\nThere exists a non-negative integer $ x $ such that Igor joined all groups with years in the interval $ [y - x, y + x] $, where $ y $ is Igor’s entrance year, and no others. The set $ A $ is exactly this interval.\n\nSince $ n $ is odd and the interval $ [y - x, y + x] $ contains $ 2x + 1 $ consecutive integers, it follows that $ n = 2x + 1 $, so $ x = \\frac{n - 1}{2} $.\n\nThe set $ A $ is a contiguous sequence of $ n $ integers. Igor’s entrance year $ y $ is the median of $ A $.\n\n**Objective**:  \n$$ y = \\text{median}(A) $$","simple_statement":null,"has_page_source":false}