p=1 for c in raw_input(): p*=2 if c=="R": p+=1 print p