
    Given the current number of active delivery routes in a fleet management system, determine the minimum number of route zones (which must be a power of 2) needed to ensure efficient distribution and balanced workload across the delivery network. For example, if there are 6 active delivery routes, the system should allocate 8 zones (as it's the smallest power of 2 greater than 6) to maintain optimal route distribution and scheduling efficiency.
    

    
def next_power_of_2(n):
    """
    Given the current number of active delivery routes in a fleet management system, determine the minimum number of route zones (which must be a power of 2) needed to ensure efficient distribution and balanced workload across the delivery network. For example, if there are 6 active delivery routes, the system should allocate 8 zones (as it's the smallest power of 2 greater than 6) to maintain optimal route distribution and scheduling efficiency.
    

    """
def next_power_of_2(n):
    """
    Given the current number of active delivery routes in a fleet management system, determine the minimum number of route zones (which must be a power of 2) needed to ensure efficient distribution and balanced workload across the delivery network. For example, if there are 6 active delivery routes, the system should allocate 8 zones (as it's the smallest power of 2 greater than 6) to maintain optimal route distribution and scheduling efficiency.
    

    """
    if n and (not n & n - 1):
        return n
    count = 0
    while n != 0:
        n >>= 1
        count += 1
    return 1 << count