uses crt;
var n:integer;
{-----------------------------------------------------}
procedure nhap(var x:integer);
var a:array[1..100]of integer;
i:integer;
begin
write('nhap chieu dai cua day='); readln(x);
for i:=1 to x do
begin
write('a[',i,']='); readln(a[i]);
end;
end;
{-----------------------thu-tuc-tinh-tong-----------------}
procedure tong(var m:integer);
var b:array[1..100]of integer;
j,t:integer;
begin
t:=0;
for j:=1 to m do
t:=t+b[j];
writeln('tong la: ',t);
end;
{------------------------chuong-trinh-chinh---------------------}
begin
clrscr;
nhap(n);
tong(n);
readln;
end.