// PascalABC.NET
begin
var n := ReadInteger('n =');
ReadSeqInteger(n).Count(p -> (p mod 3 = 0) and p.IsEven).Print
end.
// PascalABC.NET
begin
var n := ReadInteger('n =');
ReadSeqInteger(n).Count(p -> (p mod 3 = 0) and p.IsEven).Print
end.