#include<iostream>
#include<cmath>
using namespace std;

int main()
{
	int n,a,i,min;
	cin>>n;
	cin>>a;
	min=a;
	for(i=2;i<=n;i++){
	
		cin>>a;
		
		
		if(min>=a)
			min=a;}
	cout<<min;
	
	
	return 0;
	
}
