def min_operations(target):
    """
    Return number of steps taken to reach a target number
    input: target number (as an integer)
    output: number of steps (as an integer)
    """
    steps = 0
    while target != 0:
        steps += 1
        if target % 2 == 1:
            target -= 1
        else:
            target /= 2
    return steps