var i,n: integer;
s:longint;
begin
write('nhap so n=');readln(n);
s:=0;
i:=1;
while i<=n do
begin
s:=s+i; i:=i+1;
end;
write('tong cua',n,' so tu nhien dau tien la',s);
readln
end.
program cttinhtong;
uses crt;
var i,n,s : integer;
begin
clrscr;
readln(n);
i:= 0;
s:= 0;
while i<=n do
begin
s:= s+i;
i:= i|+1;
end;
write(' tong s la',s);
readln
end.