l=input() tmp=1 for i in l: tmp*=2 if i=="R":tmp+=1 print(tmp)