def seat (bpass):
    """Returns the seat ID for the given boarding pass (`bpass`)."""
    row = sum(2**(6-n) for n, s in enumerate(bpass[0:7]) if s == 'B')
    col = sum(2**(2-n) for n, s in enumerate(bpass[7:] ) if s == 'R')
    return (row * 8) + col