#include using namespace std; int main(int argc, const char* argv[]) { string S; cin >> S; uint64_t v = 1; for (auto&& c : S) v = v * 2 + (c == 'R'); cout << v << endl; return 0; }