
    Given the current number of patients in the emergency room waiting area, determine the largest group size (which must be a power of 2) that can be assigned to a single medical team without exceeding the total patient count, ensuring optimal triage efficiency and workload balance. For example, if there are 30 patients, the function should return 16, as it's the largest power of 2 that allows for complete team assignment without overflow.
    

    
def highest_Power_of_2(n):
    """
    Given the current number of patients in the emergency room waiting area, determine the largest group size (which must be a power of 2) that can be assigned to a single medical team without exceeding the total patient count, ensuring optimal triage efficiency and workload balance. For example, if there are 30 patients, the function should return 16, as it's the largest power of 2 that allows for complete team assignment without overflow.
    

    """
def highest_Power_of_2(n):
    """
    Given the current number of patients in the emergency room waiting area, determine the largest group size (which must be a power of 2) that can be assigned to a single medical team without exceeding the total patient count, ensuring optimal triage efficiency and workload balance. For example, if there are 30 patients, the function should return 16, as it's the largest power of 2 that allows for complete team assignment without overflow.
    

    """
    res = 0
    for i in range(n, 0, -1):
        if i & i - 1 == 0:
            res = i
            break
    return res