64 2. Let $A P$ be the longest diagonal. If side $M N = A P$, and $M, N$ are different from $A, P$, then as shown in Figure 9(a),
$$
A N + P M = A O + O P + O N + O M > A P + M N = 2 A P
$$

Thus, at least one of $A N, P M$ is greater than $A P$. This is a contradiction. Therefore, any side equal to $A P$ must have $A$ or $P$ as a vertex.
If there are sides $A M = P N = A P$ on the same side of $A P$, then $A N \leqslant A P, P M \leqslant A P$, so $\angle P A M \leqslant 60^{\circ}, \angle A P N \leqslant 60^{\circ}$. In this case, lines $A M$ and $P N$ must intersect, and the intersection point must be $M$, which is also $N$. And $\triangle A M P$ is an equilateral triangle. At this time, the other side $A Q$ with $A$ as a vertex is on the other side of $A P$. Therefore, $\angle M A Q > 60^{\circ}$, so $A Q$ cannot equal $A P$, otherwise $M Q > A P$ (Figure 9(b)). Similarly, the other side with $P$ as a vertex cannot equal $A P$.
Thus, there are at most 2 sides equal to $A P$. When point $Q$ in Figure 9(b) is closer to $M$ than $A P$ (i.e., within the circle centered at $M$ with radius $M A$), the quadrilateral $A M P Q$ has exactly two sides equal to the longest diagonal.
Figure 9
In a convex $n$-sided polygon, $k$ sides have the same length as the longest diagonal of the polygon, then the maximum value of $k$ is . $\qquad$