Var
mass : array of integer;
len, tempNumber, summ, i : integer;
begin
write('Введите длину массива: ');
readln(len);
SetLength(mass, len);
for i := 0 to len - 1 do
begin
write('mass[', i, '] = ');
readln(mass[i]);
end;
summ := 0;
for i := 0 to len - 1 do
if mass[i] mod 3 = 2 then
summ := summ + mass[i];
writeln('Сумма: ', summ);
end.