A convex polyhedron has $n$ vertices. What is the maximum number of edges the polyhedron can have?
It is known that if the number of vertices, faces, and edges of a convex polyhedron are $c, l, e$, respectively, then

$$
c+l=e+2
$$

(This is Euler's polyhedron theorem, its proof can be found, for example, in the mathematics textbook for the 4th grade of a secondary school with an elective B curriculum.)

Let the number of triangular faces of the polyhedron be $l_{3}$, the number of quadrilateral faces be $l_{4}$, and so on. Since every edge is shared by exactly two faces, therefore

$$
2 e=3 l_{3}+4 l_{4}+5 l_{5}+\ldots \geqq 3 l_{3}+3 l_{4}+3 l_{5}+\ldots=3 l
$$

thus

$$
2 e \geqq 3 l
$$

In our case, $c=n$, so based on (1) and (2),

$$
\begin{gathered}
n+\frac{2 e}{3} \geqq e+2, \quad \text { which implies } \\
3 n-6 \geqq e .
\end{gathered}
$$

This means that the number of edges can be at most $3 n-6$.

It is easily verifiable that there exists a convex polyhedron with $3 n-6$ edges. Consider, for example, two identical regular pyramids, whose base is an $(n-2)$-sided convex polygon. By joining the two pyramids at their bases, we obtain a convex polyhedron with $n$ vertices and $3 n-6$ edges.