program tim_tong_va_tich;
uses crt;
var n,i:integer;
tong,tich:longint;
a:array[1..100]of integer;
begin
write('nhap so n:');readln(n);
i:=1;tich:=1;tong:=0;
while i<=n do
begin
write('nhap phan tu a[',i,']:');readln(a[i]);
tong:=tong+a[i];tich:=tich+a[i];
i:=i+1;
end;
writeln('tong cua cac so tren la:',tong);
writeln('tich cua cac so tren la:',tich);
readln;
end.