import sys input=lambda: sys.stdin.readline().rstrip() S=input() ans=1 for s in S: ans*=2 if s=="R": ans+=1 print(ans)