Uses crt;
var pr,sum,e,d,s,t,a:integer;
begin
readln(a);
e:=a mod 10;
d:=(a div 10) mod 10;
s:=(a div 100) mod 10;
t:=a div 1000;
pr:=1;
sum:=0;
if e mod 2 =0 then sum:=sum+e else pr:=pr*e;
if d mod 2 =0 then sum:=sum+d else pr:=pr*d;
if s mod 2 =0 then sum:=sum+s else pr:=pr*s;
if t mod 2 =0 then sum:=sum+t else pr:=pr*t;
writeln(sum);
writeln(pr);
end.