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