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