Var
A,N,N0,M:integer;
Begin
Write('N = ');ReadLn(N);
WriteLn('Введите целые числа');
N0:=0;
Repeat
N0:=N0+1;
Read(M)
Until (N0<=N)or(M mod 2 <> 0);
if N0<>N then
For N:= N0 to N-1 do
Begin
Read(A);
if (A>M)and(A mod 2 <> 0) then M:=A;
End;
WriteLn(M)
End.