// Contest.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include "pch.h"
#include <iostream>
#include <vector>
using namespace std;
vector<int> vc;
int n;
int num;
double sum;
int main()
{
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> num;
		sum += num;
		vc.push_back(num);
		
	}
	double average = sum / n;
	for (int i = 0; i < vc.size(); i++)
	{
		if (vc[i]<average) {
			cout << vc[i] << endl;
			break;
		}
	}
}


