#include using namespace std; const double PI = acos(-1); int main() { string S; cin >> S; int ret = 1; for(char& c : S) { if(c == 'L') ret = ret * 2; else ret = ret * 2 + 1; } cout << ret << endl; }