def decode(boarding_pass: str) -> int:
    """Calculate `boarding_pass` ID."""
    boarding_pass = boarding_pass.translate(str.maketrans("FBLR", "0101"))

    row = int(boarding_pass[:7], base=2)
    col = int(boarding_pass[7:], base=2)

    return row * 8 + col