If $d$ is not a perfect square, we define $T(d)$ as the length of the minimal period of the simple continued fraction expansion for $\sqrt{ d}$. Otherwise, we put $T(d) = 0$. In the recent paper (2024), F.Battistoni, L.Greni\'{ e} and G.Molteni established (in particular) an upper bound for the second moment of $T(d)$ over the segment $x<d\leqslant 2x$. As a corollary, they derived a new upper estimate for the quantity of numbers $d$ such that $T(d)>\alpha\sqrt{ x}$. In this paper, we improve slightly this result of three authors. In this version, we improve the estimate of the remainder term in the main asymptotic formula, correct some misprints and add an important remark made by F.Battistoni, L.Greni\'{ e} and G.Molteni. This remark concerns the explicit value of the constant in the main term of asymptotics.
Categories: math.NT