#include <bits/stdc++.h>
using namespace std;
//Comprando agua
int main() {
int n, c, preMin=INT_MAX;
cin >> n;
do {
cin >> c;
if(c<preMin) preMin=c;
n--;
} while(n>0);
cout << preMin;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Ci8vQ29tcHJhbmRvIGFndWEKaW50IG1haW4oKSB7CglpbnQgbiwgYywgcHJlTWluPUlOVF9NQVg7CgljaW4gPj4gbjsKCWRvIHsKCQljaW4gPj4gYzsKCQlpZihjPHByZU1pbikgcHJlTWluPWM7CgkJbi0tOwoJfSB3aGlsZShuPjApOwoJY291dCA8PCBwcmVNaW47CglyZXR1cm4gMDsKfQ==