n = 1 for i in input(): n = n * 2 + (i == 'R') print(n)