#include"iostream"
using namespace std;
int a[10]={1,2,12,32,22,1232,231,4223};
const int minmax=-999999;
int find(int *a)
{
int i;
int maxnumber = a[0];
int secnumber = minmax;
for(i=1;i<10;i++)
if(a[i]>maxnumber)
{
secnumber = maxnumber;
maxnumber = a[i];
}
else if(a[i]>secnumber)
{
secnumber = a[i];
}
return secnumber;
}
int main()
{
cout<<find(a)<<endl;;
}