uses crt;
var n,i,s:longint;B:array[1..100]of longint;
begin
clrscr;
repeat
write('Nhap so luong phan tu: ');readln(n);
if (n<=0)and(n>100) then write('NHAP LAI!');
until (n>0)and(n<=100);
for i:=1 to n do
begin
write('Nhap phan tu thu ',i,': ');readln(B[i]);
inc(s,B[i]);
end;
write('Tong: ',s);
readln
end.