1)
var
i, d, c: integer;
begin
c:=0;
readln(d);
for i:=1 to d do
If (i mod 3 = 0) and (i mod 2<>0) and (d mod i = 0) then
c:=c+i;
writeln(c);
end.
2)
var
i, d, c: integer;
begin
i:=0;
c:=0;
readln(d);
while i<=d do<br>If (i mod 3 = 0) and (i mod 2<>0) and (d mod i = 0) then begin
c:=c+i;
i:=i+1;
end;
writeln(c);
end.
3)
var i, d, c: integer;
begin
i:=0;
c:=0;
readln(d);
repeat
If (i mod 3 = 0) and (i mod 2<>0) and (d mod i = 0) then begin
c:=c+i;
i:=i+1;
end;
until iwriteln(c);
end.