Steps to Zero

Reduce a non-negative integer to zero by repeatedly applying: if even, divide by 2; if odd, subtract 1. Count and return the number of steps required.

Examples
Input: 0
Output: 0
Hints

Steps to Zero

Reduce a non-negative integer to zero by repeatedly applying: if even, divide by 2; if odd, subtract 1. Count and return the number of steps required.