uses crt;
var a:array[1..100]of integer;
i,n,t,ln,nn:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
ln:=a[1];
nn:=a[1];
t:=0;
for i:=1 to n do
begin
if ln<a[i] then ln:=a[i];
if nn>a[i] then nn:=a[i];
t:=t+a[i];
end;
writeln(ln);
writeln(nn);
writeln(t);
for i:=1 to n do
if a[i] mod 2=0 then write(a[i]:4);
readln;
end.
var n,i,max,min,s: integer;
a: array[1..100] of integer;
begin
readln(n);
for i:=1 to n do begin
readln(a[i]);
s:=s+a[i];
end;
max:=a[1]; min:=a[1];
for i:=2 to n do begin
if max<a[i] then max:=a[i];
if min>a[i] then min:=a[i];
end;
writeln('MAX=',max,' | MIN=',min);
for i:=1 to n do if a[i] mod 2=0 then write(a[i],' '); writeln;
write('Tong = ',s);
readln
end.