uses crt;
var a,b:array[1..1000]of integer;
i,n,j,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=1 to n do
begin
t:=0;
for j:=1 to i do
t:=t+a[j];
b[i]:=t;
end;
for i:=1 to n do
write(b[i]:4);
readln;
end.