s=input();c=1 for i in range(len(s)): if s[i]=='L': c*=2 else: c=2*c+1 print(c)