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