#include #include #include using namespace std; int main(){ string h; string strs; getline(cin, h); int number = 1; int n = h.size(); for (int i = 0; i < n; i++){ char s = h.at(i); strs = s; if (strs == "L"){ number *= 2; } else{ number = 2*number+1; } } cout << number << endl; return 0; }