program TongN;
var
n, i, Tong: integer;
begin
writeln('Nhap so nguyen n:');
readln(n);
while(n<5) or (n>15) do
begin
writeln('Vui long nhap n nam trong khoang 5-15');
readln(n);
end;
Tong := 0;
for i:=1 to n do
Tong := Tong + i;
writeln('Tong cac so tu 1 den n: ', Tong);
readln;
end.