strin=input() way=1 for i in range(len(strin)): if strin[i]=="R": way=way*2+1 else: way=way*2 print(way)