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