5. What is the maximum number of sides a polygon can have if each of its angles is either $172^{\circ}$ or $173^{\circ}$?

Let the number of angles with a degree measure of $172^{\circ}$ be $a$, and those with $173^{\circ}-b$. Then the sum of all angles of the polygon will be $172a + 173b$. On the other hand, the sum of the angles of a convex $n$-sided polygon is $180(n-2)$. Therefore, the following equation must hold:

$172a + 173b = 180(a + b - 2)$, or $8a + 7b = 360$. \quad 7(a + b) + a = 360

The sum $a + b$ reaches its maximum value when $a$ is minimal. The smallest possible value of $a = 3$. Then $a + b = 51$.
Answer: 51.

Criteria: correct answer without explanation - 2 points.