The sum of the exterior angles of any polygon is always 360 degrees. In an octagon, there are eight exterior angles.
Let's calculate the sum of the given exterior angles:

Simplifying the equation:

Dividing both sides by 45:

Simplifying:

Therefore, the value of x is 8.