Program psck;
var
count, comp, num : integer;
begin read(count); comp:=1; while count>0 do begin count:=count-1; read(num); if (num div 100 = 0) and (num mod 4 = 0) and (num mod 10 = 4) then comp:=comp*num; end; write('Произведение чисел - ',comp); end.