program tong_chan;
uses crt;
var N,dem:integer;
Tong:longint;
BEGIN
Clrscr;
writeln('Nhap so nguyen N =');
readln(N);
Tong := 0;
dem := 0;
while dem < N do
begin
Tong := Tong + dem*2;
dem := dem + 1;
end;
write('Tong', N, 'so tu nhien chan dau tien la: ',Tong);
readln;
END.
program bai1;
var s,i,n:longint;
begin
write('N= ');;
readln(n);
s:=0;
for i:=1 to n do
s:=s+i;
write('s= ',s);
readln
end.