var n, sum, i: integer;
begin
sum:=0;
writeln ('Do kakogo chisla osuschestvit programmu?');
write('Otvet: ');
readln(n);
for i:=0 to n do
if (i mod 6 = 0) and (i mod 10 = 6) then
sum := sum + i;
writeln('Summa: ',sum);
end.
var n, sum, i: integer;
begin
sum:=0;
writeln ('Do kakogo chisla osuschestvit programmu?');
write('Otvet: ');
readln(n);
for i:=0 to n do
if (i mod 6 = 0) and (i mod 10 = 6) then
sum := sum + i;
writeln('Summa: ',sum);
end.