program DiemTrungBinh;
var
i, n: integer;
diem, tong: real;
begin
n := 40;
tong := 0;
for i := 1 to n do
begin
write('Nhap diem cua hs ', i, ': ');
readln(diem);
tong := tong + diem;
end;
writeln('Diem cua lop la: ', tong / n:0:2);
readln;
end.