# coding: utf-8 # Here your code ! x = 1 for i in input(): x=x*2 if i=="R": x=x+1 print(x)