Răspuns :
#include <iostream>
using namespace std;
int x,i,n,P;
int main()
{ cin>>n;
P=-1;
for(i=1;i<=n;i++)
{
cin>>x;
if(x%2==0&&P==-1) P=x;
} if(P!=-1) cout<<P;
else cout<<"IMPOSIBIL";
return 0;
}
using namespace std;
int x,i,n,P;
int main()
{ cin>>n;
P=-1;
for(i=1;i<=n;i++)
{
cin>>x;
if(x%2==0&&P==-1) P=x;
} if(P!=-1) cout<<P;
else cout<<"IMPOSIBIL";
return 0;
}