#include using namespace std; int main() { string S; cin >> S; int ans = 1; for (int i = 0; i < S.size(); ++i) { ans *= 2; if (S[i] == 'R') ans++; } cout << ans << endl; }