#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,n;
cin >> n;
int ans = 21e8;
for(int i = 1;i <= n;i++)
{
cin >> a;
ans = min(ans,a);
}
cout << ans << endl;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,n;
cin >> n;
int ans = 21e8;
for(int i = 1;i <= n;i++)
{
cin >> a;
ans = min(ans,a);
}
cout << ans << endl;
return 0;
}