var
s:string;
i,ch,code,pr,count:longint;
fl:boolean;
begin
readln(s);
pr:=0;
fl:=true;
for i:=1 to Length(s) do
if s[i] in ['0'..'9'] then
begin
val(s[i],ch,code);
if fl then
begin
pr:=1;
fl:=false
end;
pr:=pr*ch;
end;
writeln(pr)
end.