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