*Chương trình
Program nnn;
Uses crt;
Var S, N:real;
Begin
Write ('Nhap N');
Readln (N);
S:=20;
N:=1
If (S>=6) then N:=N+1 and S:=-S-N else write ('Ket qua S',S);
Readln;
End.
uses crt;
var s,n:integer;
begin
clrscr;
s:=20;
n:=1;
while s>6 do
begin
n:=n+1;
s:=s-n;
end;
writeln(s);
readln;
end.