
    Given the number of passengers in a bus routing system, determine the minimum server capacity (which must be a power of 2) needed to process all passenger data without overload. The system requires that data processing capacity must be allocated in blocks of powers of 2 to maintain optimal performance, and the capacity must be sufficient to handle all current passengers.
    

    
def next_power_of_2(n):
    """
    Given the number of passengers in a bus routing system, determine the minimum server capacity (which must be a power of 2) needed to process all passenger data without overload. The system requires that data processing capacity must be allocated in blocks of powers of 2 to maintain optimal performance, and the capacity must be sufficient to handle all current passengers.
    

    """
def next_power_of_2(n):
    """
    Given the number of passengers in a bus routing system, determine the minimum server capacity (which must be a power of 2) needed to process all passenger data without overload. The system requires that data processing capacity must be allocated in blocks of powers of 2 to maintain optimal performance, and the capacity must be sufficient to handle all current passengers.
    

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