Program str;
Uses crt;
Var s:string;
i,p,sum:integer;
Begin
P:=1;
Sum:=0;
Readln(s);
For i:=1 to length(s) do
Begin
If s[i] in ['0'..'9'] then
Begin
p:=p*(ord(s[i])-ord('0')); sum:=sum+(ord(s[i])-ord('0'));
End;
End;
Writeln('Сумма = ',sum,' ','Произведение = ',p);
End.