S = list(input()) answer = 1 for i in range(len(S)) : if S[i] == "L" : answer = answer * 2 else : answer = answer * 2 + 1 print(answer)