Var
fi,fo:text;min,i,n,t:integer;
a:array[1..100] of integer;s,s1:string;
begin
assign(fi,'t.inp');reset(fi);
assign(fo,'t.out');rewrite(fo);
readln(fi,n);
For i:=1 to n do read(fi,a[i]);
readln(fi,s);min:=a[1];t:=0;s1:='';
For i:=1 to n do
Begin
If a[i]<min then min:=a[i];
If a[i] mod 2<>0 then t:=t+a[i];
end;
For i:=length(s) downto 1 do s1:=s1+s[i];
writeln(fo,t);writeln(fo,min);writeln(fo,s1);
Close(fi);Close(fo);
End.