ans = 1 for s in raw_input(): ans *= 2 if s == 'R': ans += 1 print ans