s = input().strip() current = 1 for c in s: current = current * 2 + (c == 'R') print(current)