def convert_all(string: str) -> int:
    """
    Input is the binary representation of a number. R or B means 1. L or F means 0.
    Return the value of this binary representation
    """
    return int("".join("1" if char in ("R", "B") else "0" for char in string), 2)