uses crt;
const fi='dulieuvao.dat'
var f1:text;
a,b,c,d,e:array[1.1.00]of integer;
n,m,d,x,v,t,t1,t2,t3,t4,t5,i:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
n:=0;
while not eoln(f1) do
begin
n:=n+1;
read(f1,a[n]);
end;
readln(f1);
m:=0;
while not eoln(f1) do
begin
inc(m);
read(f1,b[m]);
end;
readln(f1);
d:=0;
while not eoln(f1) do
begin
inc(d);
read(f1,c[d]);
end;
readln(f1);
x:=0;
while not eoln(f1) do
begin
inc(x);
read(f1,d[x]);
end;
readln(f1);
v:=0;
while not eoln(f1) do
begin
inc(v);
read(f1,e[v]);
end;
t:=0;
for i:=1 to n do
t:=t+a[i];
writeln('Tong cua day 1 la: ',t);
t1:=0;
for i:=1 to m do
t1:=1+b[i];
writeln('Tong cua day 2 la: ',t1);
t2:=0;
for i:=1 to d do
t2:=t2+c[i];
writeln('Tong cua day 3 la: ',t2);
t3:=0;
for i:=1 to x do
t3:=t3+d[i];
writeln('Tong cua day 4 la: ',t3);
t4:=0;
for i:=1 to v do
t4:=t4+e[i];
writeln('Tong cua day 5 la: ',t4);
close(f1);
readln;
end.