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