s=input() ans=1 for i in s: if i=="L": ans*=2 else: ans*=2 ans+=1 print(ans)