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