#include using namespace std; typedef long long ll; int main(){ string S; cin >> S; int res = 1; for(auto c : S){ if(c == 'L'){ res *= 2; } else { res *= 2; ++res; } } cout << res << endl; return 0; }