s = input() pos = 1 for lr in s: pos *= 2 if lr == "R": pos += 1 print(pos)