Program HOC24;
Var a,b: array[1..32000] of real;
i,n: integer;
max,d1,d: real;
begin
write('Nhap so hoc sinh : '); readln(n);
for i:=1 to n do
begin
write('Nhap diem toan ban thu ',i,' : '); readln(a[i]);
write('Nhap diem van ban thu ',i,' : '); readln(b[i]);
end;
max:=0;
for i:=1 to n do
begin
d:=a[i]+b[i];
d1:=d/2;
if d1>max then max:=d1;
end;
write('Diem trung binh cao nhat la : ',max);
readln
end.