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