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