#include <bits/stdc++.h>
using namespace std;

int main(){
    string s;
    if(!(cin>>s)){
        cout<<1<<endl;
    }
    for(auto& i:s){
        if(i=='R'){
            i='1';
        }
        else{
            i='0';
        }
    }
    int n=stoi('1'+s,nullptr,2);
    cout<<n<<endl;
    //system("pause");
}