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