def get_ones_mask(mask):
    """
    Calculates the mask used to set 1 values

    >>> get_ones_mask("XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X")
    64

    >>> f"{get_ones_mask('XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X'):b}"
    '1000000'

    :param mask:
    :return:
    """
    return int(mask.replace("X", "0"), 2)