
    Given the total number of available hospital beds, determine the largest ward size (in number of beds) that can be created while maintaining the hospital's requirement that each ward must contain beds in powers of 2 (2, 4, 8, 16, etc.) for optimal patient distribution and resource allocation. This ward size should not exceed the total number of available beds.
    

    
def highest_Power_of_2(n):
    """
    Given the total number of available hospital beds, determine the largest ward size (in number of beds) that can be created while maintaining the hospital's requirement that each ward must contain beds in powers of 2 (2, 4, 8, 16, etc.) for optimal patient distribution and resource allocation. This ward size should not exceed the total number of available beds.
    

    """
def highest_Power_of_2(n):
    """
    Given the total number of available hospital beds, determine the largest ward size (in number of beds) that can be created while maintaining the hospital's requirement that each ward must contain beds in powers of 2 (2, 4, 8, 16, etc.) for optimal patient distribution and resource allocation. This ward size should not exceed the total number of available beds.
    

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