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