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