Please solve the programming task below using a self-contained code snippet in a markdown code block.

A valid cut in a circle can be:

A cut that is represented by a straight line that touches two points on the edge of the circle and passes through its center, or
A cut that is represented by a straight line that touches one point on the edge of the circle and its center.

Some valid and invalid cuts are shown in the figures below.

Given the integer n, return the minimum number of cuts needed to divide a circle into n equal slices.
 
Please complete the following python code precisely:
```python
class Solution:
    def numberOfCuts(self, n: int) -> int:
```