S=input() c=1 for a in S: if a == "L": c*=2 else: c=c*2+1 print(c)