/*
using System;
namespace ConsoleApp5
{
class Program
{
static void Main(string[] args)
{
string a = Console.ReadLine();
string[] b = a.Split(' ');
int x = Convert.ToInt32(b[0]);
int y = Convert.ToInt32(b[1]);
string z = b[2];
for(int i = 0; i<x; i++)
{
if(z=="L")
{
for(int k = 0; k<i; k++)
{
Console.Write(" ");
}
}
else
{
for(int f =i; f<y; f++)
{
Console.Write(" ");
}
}
for (int j = 0; j < y; j++)
{
Console.Write("*");
}
Console.WriteLine();
}
}
}
}
*/
/*
using System;
namespace ConsoleApp4
{
class Program
{
static void Main(string[] args)
{
int x = 5;
int[] arr = new int[x];
// int [][] arr3 = new int[x][x];
for(int i=0; i<arr.Length; i++)
{
arr[i] = (i+1) * 100;
}
}
}
}
*/
/*
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
int x = Convert.ToInt32(Console.ReadLine());
int[] arr = new int[x];
string a = Console.ReadLine();
string[] b = a.Split(' ');
for(int i = 0; i<arr.Length; i++)
{
arr[i] = Convert.ToInt32(b[i]);
}
for(int i=arr.Length-1; i>=0; i--)
{
Console.Write(arr[i] + " ");
}
}
}
}
*/
/*
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
int x = Convert.ToInt32(Console.ReadLine());
int[] arr = new int[x];
string a = Console.ReadLine();
string[] b = a.Split(' ');
for(int i = 0; i<arr.Length; i++)
{
arr[i] = Convert.ToInt32(b[i]);
}
for(int i = 0; i<arr.Length*2; i++)
{
Console.WriteLine(arr[i%x]);
}
// 0 1 2 3 4 5
// 0 1 2 0 1 2
}
}
}
*/
/*
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
int x = Convert.ToInt32(Console.ReadLine());
string a = Console.ReadLine();
string[] b = a.Split(' ');
int[] data = new int[24];
for(int i = 0; i<b.Length; i++)
{
int p = Convert.ToInt32(b[i]);
data[p]++;
}
for(int i=1; i<=23; i++)
{
Console.Write(data[i] + " ");
}
}
}
}
*/
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
int x = Convert.ToInt32(Console.ReadLine());
int[] arr = new int[x];
string a = Console.ReadLine();
string[] b = a.Split(' ');
int min = 10001;
for(int i = 0; i<b.Length; i++)
{
arr[i] = Convert.ToInt32(b[i]);
}
for(int j = 0; j<x; j++)
{
if(arr[j]<min)
{
min = arr[j];
}
}
Console.WriteLine(min);
}
}
}
// 1411, 1409, 1430(hard), 1405(next), 1440(next)