Consider a regular polygon with n sides, where each exterior angle measures x degrees. The relationship between the number of sides and the exterior angle is given by the formula:
$$x = \f\frac{360}{n}$$
Additionally, the sum of all the interior angles, S, of the polygon is determined by the formula:
$$S = 180(n - 2)$$
If the measure of each interior angle of the polygon is numerically equal to its exterior angle, what is the value of n?