A convex polygon has $n$ sides. If the sum of the interior angles of this polygon is twice the sum of the interior angles of a triangle, how many sides does the polygon have? Let's think step by step and output the final answer within \boxed{}.
user