Uses crt;
var i,n,h,max,min,k: longint;
a: array[1..100] of longint
begin clrscr;
readln(n);
for i:=1 to n do read(a[i]); readln;
writeln(a[i],' ');
max:=a[1];
for i:=1 to n do if(max<a[i]) then max:=a[i];
Writeln(max);
min:=a[1];
for i:=1 to n do if(min>a[i]) then min:=ai[i];
writeln(min);
for i:=1 to n do begin
if(a[i] mod 2=0) then h:=h+a[i];
end;
Writeln('Tong cac so chan la:',h);
for i:=1 to n do begin
if(a[i] mod 2<>0) then k:=k+a[i];
end;
writeln('Tong cac so le la:',k);
readln;
end.