
    Given a medical image with dimension size n pixels, determine the largest power of 2 that can be used to resize the image while maintaining maximum possible resolution for efficient disease detection processing. The resized dimension should not exceed the original image size n to prevent data loss or image distortion.
    

    
def highest_Power_of_2(n):
    """
    Given a medical image with dimension size n pixels, determine the largest power of 2 that can be used to resize the image while maintaining maximum possible resolution for efficient disease detection processing. The resized dimension should not exceed the original image size n to prevent data loss or image distortion.
    

    """
def highest_Power_of_2(n):
    """
    Given a medical image with dimension size n pixels, determine the largest power of 2 that can be used to resize the image while maintaining maximum possible resolution for efficient disease detection processing. The resized dimension should not exceed the original image size n to prevent data loss or image distortion.
    

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