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