s = list(input()) import sys if len(s)==0: sys.exit() start = 1 for si in s: if si=="L": start=start*2 else: start=start*2+1 print(start)