var
a, i, res: integer;
begin
res := 1;
for i := 1 to 10 do
read(a);
if a < 5 then
res := res * a;
end;
writeln(res);
end.
var
a, i, res: integer;
begin
res := 1;
for i := 1 to 10 do
begin
read(a);
if a < 5 then
res := res * a;
end;
writeln(res);
end.