num = 1 for root in input(): num *= 2 if root == "R": num += 1 print(num)