A polygon has 35 diagonals. How many sides does it have?