#include using namespace std; int main(){ string S; cin >> S; int N = 1; for (char c : S){ N *= 2; if (c == 'R') N++; } cout << N << endl; }