S = input() X = 1 for s in S: X = X*2 + (s == 'R') print(X)