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