In a regular 1000-gon, all diagonals are drawn. What is the maximum number of diagonals that can be selected such that among any three of the chosen diagonals, at least two have the same length?