root = input() ans = 1 for r in root: ans = ans * 2 + (r == "R") print(ans)