#include using namespace std; const long long INF = 1LL << 60; #define MOD 1000000007; typedef long long ll; #define writeln(n) cout< P; typedef pair Psi; int main() { string ss; cin>>ss; int sum =1; for(char e: ss){ if(e =='L'){ sum +=sum; }else { sum += sum+1; } } writeln(sum); }