#include using namespace std; int main() { string S; cin >> S; long long now = 1; for (auto& c : S) (now <<= 1) += (c == 'R'); cout << now << endl; }