S = input().strip() n = 1 for d in S: if d == "L": n = 2 * n else: n = (2 * n ) + 1 print(n)