The diameter of a circle of radius $R$ is divided into $2n$ equal parts. The point $M$ is taken on the circle. Prove that the sum of the squares of the distances from the point $M$ to the points of division (together with the ends of the diameter) does not depend on the choice of the point $M$. Calculate this sum.