Detailed Instructions: The task is to generate the correct answer for a given math problem.
Q: Problem: the number of diagonals of a polygon of n sides is given by the formula q = n ( n - 3 ) / 2 . if a polygon has twice as many diagonals as sides , how many sides does it have ?
A:
5