uses crt;
var a:array[1..100]of byte;
i,n,t:byte;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
{----------------------------cau-a----------------------------}
t:=0;
for i:=1 to n do
t:=t+a[i];
writeln(t);
{---------------------------------cau-b--------------------------------}
for i:=1 to n do write(a[i]:4);
readln;
end.