#include using namespace std; using ll = long long; int main(void) { string S; cin >> S; ll now = 1; for(auto c : S) { now *= 2; if(c == 'R') now += 1; } cout << now << "\n"; return 0; }