Ответ: var    i, s, n, d: integer;begin    readln(n);    for i := 1 to n do     begin        readln(d);        if (d mod 10 = 8) and (d mod 3 = 0) then            s := s + d;    end;    writeln(s);end.