int numberOfSteps(int n) {
int s = 0;
while (n != 0) {
// Odd
if (n & 1) {
// Subtract 1
n = n ^ 1;
} else {
// Divide by 2
n >>= 1;
}
// Increase step count
s ++;
return s;