S=list(input()) O=1 for A in S: O*=2 if A=='R':O+=1 print(O)