S = input() ans = 1 for c in S: ans *= 2 if c == "R": ans += 1 print (ans)