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

Given an integer num, return the number of steps to reduce it to zero.
In one step, if the current number is even, you have to divide it by 2, otherwise, you have to subtract 1 from it.
 
Please complete the following python code precisely:
```python
class Solution:
    def numberOfSteps(self, num: int) -> int:
```