var n,sum:integer;
begin
for n:=20 to 100 do begin
if(n mod 3 = 0)and((n mod 10 = 2)or
(n mod 10 = 4)or
(n mod 10 = 8))then sum:= sum + n;
end;
write(sum);
end.
var n,sum:integer;
begin
for n:=20 to 100 do begin
if(n mod 3 = 0)and((n mod 10 = 2)or
(n mod 10 = 4)or
(n mod 10 = 8))then sum:= sum + n;
end;
write(sum);
end.