h = 1 for d in raw_input(): h = h*2+(d=="R") print h