s = input() l = 1 for c in s: l = 2 * l + (c == "R") print(l)