english: Then for the case of all distances equal to $d$ we choose only leftmost and rightmost positions of Y among $\left\lceil\frac{n - r}{d}\right\rceil$ possible ones in $\binom{\left\lceil\frac{n - r}{d}\right\rceil}{2}$ ways.
non_english: うぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅうぐぅぅうぐぅうぐぅぐ～ぐ～ぐ～。。。。