s=str(input()) l="L" r="R" c=1 for i in range(len(s)): if s[i]==l: c=c*2 else: c=c*2+1 print(c)