#include<iostream>
using namespace std;
int main(){
unsigned int n;
cin>>n;
int A[n];
for(int i=0;i<n;i++){
cin>>A[i];
}
int tg;
for(int i=0;i<n-1;i++)
for(int j=i+1;j<n;j++){
if(A[i]<A[j]){
tg=A[i];
A[i]=A[j];
A[j]=tg;
}
}
int dem=0;
for(int i=0;i<n;i++)
{
if(A[i]==A[0])
{
continue;
}
cout<<A[i];
dem++;
break;
}
if(dem==0) cout<<"NOT FOUND";
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBtYWluKCl7Cgl1bnNpZ25lZCAgaW50IG47CgljaW4+Pm47CglpbnQgQVtuXTsKCWZvcihpbnQgaT0wO2k8bjtpKyspewoJCWNpbj4+QVtpXTsKCX0KCWludCB0ZzsKCWZvcihpbnQgaT0wO2k8bi0xO2krKykKCQlmb3IoaW50IGo9aSsxO2o8bjtqKyspewoJCQlpZihBW2ldPEFbal0pewoJCQkJdGc9QVtpXTsKCQkJCUFbaV09QVtqXTsKCQkJCUFbal09dGc7CgkJCX0JCQoJfQogICAgaW50IGRlbT0wOwoJZm9yKGludCBpPTA7aTxuO2krKykKCXsKCSAgICBpZihBW2ldPT1BWzBdKQoJICAgIHsKCSAgICAgICBjb250aW51ZTsKCSAgICB9CgkgICAgY291dDw8QVtpXTsKICAgICAgICBkZW0rKzsKCSAgICBicmVhazsKCX0KICAgIGlmKGRlbT09MCkgY291dDw8Ik5PVCBGT1VORCI7CglyZXR1cm4gMDsKfSAgIA==