var
i,k, p: integer;
begin
p:=1;
for i:=1 to 8 do
Readln (k);
if k div 10 = 0 then p:=p*k
end;
writeln (p);
end.
var
i,k, p: integer;
begin
p:=1;
for i:=1 to 8 do
begin
Readln (k);
if k div 10 = 0 then p:=p*k
end;
writeln (p);
end.